Search existing knowledge for a passage
POST/v2/training_data/search
Searches one passage or claim across Q&A, training files, and live help-center articles. Returns ranked candidates and query-focused excerpts without judging or writing. Similarity is an embedding score, not factual confidence; calibrate thresholds on representative examples and retain keyword-only results (similarity null). Retrieval and excerpts can miss relevant facts. Fetch full sources for decisions. Split long documents into bounded sections and audit each section before upload. Latency and embedding work depend on query size and service load.
Body ParametersJSON
query: string
A passage, claim, or question to find existing knowledge for — for example one section of a document you are about to upload. Compared by meaning and by keywords.
minLength1
maxLength4000
Search existing knowledge for a passage
curl https://do.featurebase.app/v2/training_data/search \
-H 'Content-Type: application/json' \
-H "Authorization: Bearer $FEATUREBASE_API_KEY" \
-d '{
"query": "Refunds are processed within 14 days of the request.",
"excludeIds": [
"67ec1234abcd5678ef901235"
],
"kinds": [
"help_center_article",
"qna"
],
"topK": 8
}'{
"candidates": [
{
"id": "67ec1234abcd5678ef901236",
"externalId": null,
"kind": "qna",
"questions": [
"How do I request a refund?"
],
"revision": 1,
"section": null,
"similarity": 0.61,
"source": null,
"text": "You can request a refund within 30 days from **Settings → Billing**.",
"title": "Refund requests",
"url": null
}
],
"object": "knowledge_search",
"query": "Refunds are processed within 14 days of the request.",
"timings": {
"retrievalMs": 690
}
}Returns Examples
{
"candidates": [
{
"id": "67ec1234abcd5678ef901236",
"externalId": null,
"kind": "qna",
"questions": [
"How do I request a refund?"
],
"revision": 1,
"section": null,
"similarity": 0.61,
"source": null,
"text": "You can request a refund within 30 days from **Settings → Billing**.",
"title": "Refund requests",
"url": null
}
],
"object": "knowledge_search",
"query": "Refunds are processed within 14 days of the request.",
"timings": {
"retrievalMs": 690
}
}