documents, message_history, or instructions is required.
Example
Parameters
-
user_query(string): Input query or prompt. Required when hallucination or document relevancy detection is enabled. -
model_output(string): The response generated by the model. Required when hallucination detection is enabled. -
documents(array<string|object>): Evidence documents. If objects are provided, they must have apage_contentkey and may includemetadata. Example: -
message_history(array, optional): Previous messages following OpenAI format{ role, content }. Required if used for hallucination detection. -
instructions(array, optional): Instruction strings given to the model. Used in hallucination detection. -
tags(object, optional): Custom metadata to attach to the log. Example:{ "model": "gpt-4", "customer": "enterprise-A" }.
Notes
- When hallucination detection is enabled, one of
documents,message_history, orinstructionsis required. - Log only the documents actually retrieved, not the entire corpus.
- Metadata tags make reports far more useful (e.g., breakdown by retriever or model version).
Best Practices
- Keep evidence minimal but sufficient for attribution (avoid dumping full corpora).
- Standardize tag keys (
model,retriever,customer) for consistent filtering. - Include the returned
log_idin your own telemetry to cross-reference with Quotient reports.
Next: Retrieve Logs