Ask what to do with a Q&A entry
Checks a proposed Q&A without writing. Optional externalId or an existing normalized question addresses a target. Changed content is compared with that entry even if retrieval or excludeIds misses it. The judge continues past agreement to detect later contradictions; uncertainty takes precedence over agreement. Another agreeing Q&A remains visible for duplicate review.
Actions: create means no overlap found in checked candidates; update_target refers to existing; update_qna refers to target; review_qna / review_article / review_file require review of the source; skip means an identical payload or already-covered answer. existing and Q&A candidates include revisions: use PATCH expectedRevision for a subsequent reviewed update.
The evidence is bounded: retrieval can miss knowledge, document excerpts omit context, and checks observe changing data. checkTruncated reports verification shortlist or text limits and yields unclear unless a contradiction was found. False does not imply exhaustive coverage or factual correctness. Inspect full sources before promotion. Dependencies failing returns 503; this endpoint never writes.
Ask what to do with a Q&A entry
import Featurebase from 'featurebase-node';
const client = new Featurebase({
apiKey: process.env['FEATUREBASE_API_KEY'], // This is the default and can be omitted
});
const oracle = await client.trainingData.oracle({
answer: 'You can request a refund within 30 days from **Settings → Billing**.',
questions: ['How do I request a refund?', 'Can I get my money back?'],
});
console.log(oracle.candidates);{
"action": "review_article",
"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
}
],
"checkTruncated": true,
"existing": {
"id": "67ec1234abcd5678ef901234",
"question": "How long do refunds take?",
"revision": 1
},
"judged": [
{
"candidateId": "67ec1234abcd5678ef901236",
"kind": "qna",
"reason": "Both answer how to request a refund.",
"verdict": "same_topic"
}
],
"object": "oracle",
"reason": "The new entry says 14 days; the article says 30 days.",
"target": {
"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
},
"timings": {
"judgeCalls": 1,
"judgeMs": 610,
"retrievalMs": 420
},
"verdict": "same_topic"
}Returns Examples
{
"action": "review_article",
"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
}
],
"checkTruncated": true,
"existing": {
"id": "67ec1234abcd5678ef901234",
"question": "How long do refunds take?",
"revision": 1
},
"judged": [
{
"candidateId": "67ec1234abcd5678ef901236",
"kind": "qna",
"reason": "Both answer how to request a refund.",
"verdict": "same_topic"
}
],
"object": "oracle",
"reason": "The new entry says 14 days; the article says 30 days.",
"target": {
"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
},
"timings": {
"judgeCalls": 1,
"judgeMs": 610,
"retrievalMs": 420
},
"verdict": "same_topic"
}