Query a Knowledge Base

Query a Knowledge Base for matching results.

Use the retrieve API to query a Knowledge Base for information matching keywords or phrases.

When you query a knowledge base, you must submit a POST request:

  1. Identify the Knowledge Base to query using its code in the URL of the request.

  2. Specify the text to search the Knowledge Base for using the text parameter.

  3. Specify filters to restrict the documents that are searched.

The API will return matching items (portions of legislation, judgment summaries) that match your query, including a score, the text of the portion, and metadata.

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
post
/ai/v1/knowledge-bases/{code}/retrieve
200Success

Last updated