POST
/
api
/
datasets
/
{id}
/
document-filtered-search

Path Parameters

id
string
required

Dataset ID

Authorization
string

Baseplate API key. Must be in the format โ€œBearer $BASEPLATE_API_KEYโ€

Body Parameters

query
string
required

Query string

top_k_documents
number
default: "3"

Number of documents to use in embedding search filter.

top_k_rows
number
default: "3"

Number of documents to use in embedding search filter.

Responses

{
  "document_results": [
    {
      "document_id": "fc74e81e-05ac-4df6-936f-ce51cc69a868",
      "dataset_id": "e2fa7f7b-d580-4ecf-8232-a1131938a3fc",
      "content": "",
      "filename": "doc1.pdf",
      "url": "/5274962e-04c3-4a23-b3d5-1d7e1ea6a230/doc1.pdf",
      "similarity": 0.0919062
    },
    {
      "document_id": "e6afaf5b-e8f0-4af3-ba50-bbb2d0d1f1af",
      "dataset_id": "e2fa7f7b-d580-4ecf-8232-a1131938a3fc",
      "content": "",
      "filename": "doc2.pdf",
      "url": "/5274962e-04c3-4a23-b3d5-1d7e1ea6a230/doc2.pdf",
      "similarity": 0.0919062
    }
  ],
  "results": [
    {
      "embedding": "Example text",
      "data": {
        "text": "Example text"
      },
      "confidence": 10.3084955,
      "query": "text",
      "metadata": {
        "documentId": "fc74e81e-05ac-4df6-936f-ce51cc69a868",
        "rowId": 567228,
        "url": "/5274962e-04c3-4a23-b3d5-1d7e1ea6a230/doc1.pdf"
      }
    },
    {
      "embedding": "Example text 2",
      "data": {
        "text": "Example text 2"
      },
      "confidence": 10.3084955,
      "query": "text",
      "metadata": {
        "documentId": "e6afaf5b-e8f0-4af3-ba50-bbb2d0d1f1af",
        "rowId": 569813,
        "url": "/5274962e-04c3-4a23-b3d5-1d7e1ea6a230/doc2.pdf"
      }
    }
  ]
}