Experience · Data artifact

RAG Query API Schema

Data artifactExperienceExperience & Human Oversightarc:RAGQueryAPISchema

A typed request/response contract for a RAG service that bounds query length and retrieval parameters and structures answers with sources, timing breakdown, token usage and cache status.

Responsibility. Defines and validates the RAG service request/response contract.

Also known as: QueryRequest / QueryResponse models, API contract

constrainsREST Agent API: constrainsREST Agent API
Direct neighbourhood (hover for relationship types)

Relationships

constrains control

Design guidance

Quantitative guidance

As stated by the sources; verify before use.

Classification

Patterns
Schema-driven request validationSelf-documenting OpenAPI contract
Technologies
PydanticOpenAPI
Risks mitigated
Malformed or oversized queriesUnbounded prompt length from excessive top_k

Sources

  1. Ch6.5: T. Nguyen, "Production RAG Systems," in Mastering Agentic AI Systems: Guide for the NVIDIA NCP-AAI Exam, 1st ed. 2026, ch. 6.5. ISBN: 9798244538229.