Query a Knowledge Base

Query a Knowledge Base for matching legal context.

Use the retrieve endpoint to query a Knowledge Base for legal information that matches keywords, phrases or AI-generated search text.

The request must:

  1. identify the Knowledge Base by code in the URL;

  2. include the text to search for;

  3. optionally include top_k and filters.

The response returns matching items with text, metadata and a score.

Query the knowledge base for matching items.

post

Retrieve items from the knowledge base that match your query.

Authorizations
sessionidstringRequired
Path parameters
codestringRequired

Unique code identifying this knowledge base

Body

Details to retrieve items from a knowledge base.

textstringRequired

The text to find matching items for

top_kinteger · min: 1 · max: 100Optional

Number of results to return

Default: 10
Responses
200Success
application/json

Items retrieved from a knowledge base.

post
/ai/v1/knowledge-bases/{code}/retrieve
200Success

Last updated