Skip to main content

GEN_AI_RETRIEVAL_DOCUMENTS

Constant GEN_AI_RETRIEVAL_DOCUMENTS 

pub const GEN_AI_RETRIEVAL_DOCUMENTS: &'static str;
👎Deprecated:

{note: Moved to the OpenTelemetry GenAI semantic conventions repository. , reason: uncategorized}

Available on crate features opentelemetry and semconv_experimental only.
Expand description

The documents retrieved.

§Notes

Instrumentations MUST follow Retrieval documents JSON schema. When the attribute is recorded on events, it MUST be recorded in structured form. When recorded on spans, it MAY be recorded as a JSON string if structured format is not supported and SHOULD be recorded in structured form otherwise.

Each document object SHOULD contain at least the following properties: id (string): A unique identifier for the document, score (double): The relevance score of the document

§Examples

  • "[\n {\n \"id\": \"doc_123\",\n \"score\": 0.95\n },\n {\n \"id\": \"doc_456\",\n \"score\": 0.87\n },\n {\n \"id\": \"doc_789\",\n \"score\": 0.82\n }\n]\n"