Skip to main content
Training Data

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.

POST
/v2/training_data/oracle

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.

Authorizationstringheaderrequired

API key as Bearer token. Use: Authorization: Bearer sk_...

Featurebase-Versionenum<string>header

API version for this request. Defaults to your organization's configured API version if not specified.

Available options: 2026-08-19.orbit, 2026-01-01.nova, 2025-12-12.clover
Example: 2026-08-19.orbit

Body

application/json
answerstringrequired

The answer the entry would give. Compared by the judge, never used as a search query.

Required string length: 1 - 100000
Example: You can request a refund within 30 days from **Settings → Billing**.
answerFormatenum<string>default:markdown

Format of answer. markdown (default) is stored as-is; html is converted to markdown.

Available options: markdown, html
Example: markdown
excludeIdsstring[]

Q&A entry / training file IDs to omit from retrieval. The addressed Q&A entry is still compared when its content changes.

Maximum array length: 20
externalIdstring

Stable identity of the would-be Q&A entry. The oracle only reads; it never creates or updates it.

Required string length: 1 - 255
questionsstring[]required

Question variants this answer applies to (1–50). Phrase them the way customers ask.

Required array length: 1 - 50
titlestring

Short label for the would-be entry (also used as a search query)

Required string length: 1 - 500
Example: Refund requests

Response

application/json

Success

actionenum<string>required

Suggested next step. create: no overlap found in the checked candidates; verify the source before writing. update_target: an entry already carries one of these questions (existing) and should be updated with this content — use PATCH with expectedRevision from existing to bind the write to this check. update_qna: an existing Q&A entry already answers this with the same facts — merge into it (target) instead of adding a second one. review_qna / review_article / review_file: an existing item (target) contradicts this answer or the judge could not decide — a human should pick the right fact and fix the source. skip: the knowledge already exists (an article or file answers it, or the payload is identical to the entry that already carries the question); nothing to write.

Available options: create, update_target, update_qna, review_qna, review_article, review_file, skip
Example: review_article
candidatesobject[]required

Retrieved items and the addressed entry (first when present), at most 10. Excerpts are partial evidence.

checkTruncatedbooleanrequired

A candidate or text budget limited verification (including clipped proposed answers or Q&A answers). This yields unclear unless a contradiction was already found. False does not mean the entire workspace was exhaustively checked.

existingobject | nullrequired

The Q&A entry addressed by externalId or a normalized question, including its checked revision, or null

judgedobject[]required

Per-candidate judge verdicts, in the order they were judged. Judging continues after agreement or uncertainty and stops on a contradiction. The addressed entry is always compared when its content changes. Only shortlisted candidates are judged, so this is usually shorter than candidates.

objectenum<string>required

Object type identifier

Available options: oracle
Example: oracle
reasonstringrequired

One or two sentences explaining the action, from the judge when it ran

Example: The new entry says 14 days; the article says 30 days.
targetobject | nullrequired

The existing item the action refers to, with its excerpt; null for create / update_target. For a different verdict the closest miss is candidates[0].

timingsobjectrequired

Where the time went

verdictenum<string>required

How the closest existing item relates to the entry. same_topic: it answers the same customer question (the entry would be a duplicate, rewording, or updated version). contradicts: same question, incompatible facts. different: a different question, even if the wording overlaps. unclear: the judge could not decide. no_match: nothing similar was found.

Available options: same_topic, contradicts, different, unclear, no_match
Example: same_topic