# Contextual AI Documentation ## Docs - [CCPA](https://contextualai-new-home-nav.mintlify.app/admin-setup/ccpa.md) - [GDPR](https://contextualai-new-home-nav.mintlify.app/admin-setup/gdpr.md) - [HIPAA](https://contextualai-new-home-nav.mintlify.app/admin-setup/hipaa.md) - [Overview](https://contextualai-new-home-nav.mintlify.app/admin-setup/overview.md): Everything You Need to Get Up & Running with Contextual AI - [Pricing & Billing](https://contextualai-new-home-nav.mintlify.app/admin-setup/pricing-billing.md): Details on the cost structure for on-demand, usage-based plans - [RBAC](https://contextualai-new-home-nav.mintlify.app/admin-setup/rbac.md): Define custom roles and permission bundles across agents, datastores, and more - [SOC 2](https://contextualai-new-home-nav.mintlify.app/admin-setup/soc2.md): Contextual AI SOC 2 Compliance - [Get Metrics](https://contextualai-new-home-nav.mintlify.app/api-reference/agents-query/get-metrics.md): Returns usage and user-provided feedback data. This information can be used for data-driven improvements and optimization. - [Get Retrieval Info](https://contextualai-new-home-nav.mintlify.app/api-reference/agents-query/get-retrieval-info.md): Return metadata of the contents used to generate the response for a given message. - [Provide Feedback](https://contextualai-new-home-nav.mintlify.app/api-reference/agents-query/provide-feedback.md): Provide feedback for a generation or a retrieval. Feedback can be used to track overall `Agent` performance through the `Feedback` page in the Contextual UI, and as a basis for model fine-tuning. - [Query](https://contextualai-new-home-nav.mintlify.app/api-reference/agents-query/query.md): Start a conversation with an `Agent` and receive its generated response, along with relevant retrieved data and attributions. - [Copy Agent](https://contextualai-new-home-nav.mintlify.app/api-reference/agents/copy-agent.md): Copy an existing agent with all its configurations and datastore associations. The copied agent will have "[COPY]" appended to its name. - [Create Agent](https://contextualai-new-home-nav.mintlify.app/api-reference/agents/create-agent.md): Create a new `Agent` with a specific configuration. This creates a specialized RAG `Agent` which queries over one or multiple `Datastores` to retrieve relevant data on which its generations are grounded. Retrieval and generation parameters are defined in the provided `Agent` configuration. If no `datastore_id` is provided in the configuration, this API automatically creates an empty `Datastore` and configures the `Agent` to use the newly created `Datastore`. > Note that self-serve users are currently required to create agents through our UI. Otherwise, they will receive the following message: "This endpoint is disabled as you need to go through checkout. Please use the UI to make this request." - [Delete Agent](https://contextualai-new-home-nav.mintlify.app/api-reference/agents/delete-agent.md): Delete a given `Agent`. This is an irreversible operation. Note: `Datastores` which are associated with the `Agent` will not be deleted, even if no other `Agent` is using them. To delete a `Datastore`, use the `DELETE /datastores/{datastore_id}` API. - [Edit Agent](https://contextualai-new-home-nav.mintlify.app/api-reference/agents/edit-agent.md): Modify a given `Agent` to utilize the provided configuration. Fields not included in the request body will not be modified. - [Get Agent Metadata](https://contextualai-new-home-nav.mintlify.app/api-reference/agents/get-agent-metadata.md): Get metadata and configuration of a given `Agent`. - [Get Template Configuration](https://contextualai-new-home-nav.mintlify.app/api-reference/agents/get-template-configuration.md) - [List Agents](https://contextualai-new-home-nav.mintlify.app/api-reference/agents/list-agents.md): Retrieve a list of all `Agents`. - [List Templates](https://contextualai-new-home-nav.mintlify.app/api-reference/agents/list-templates.md): Retrieve a list of all available Templates. - [Reset Agent](https://contextualai-new-home-nav.mintlify.app/api-reference/agents/reset-agent.md): Reset a given `Agent` to default configuration. - [Save Template](https://contextualai-new-home-nav.mintlify.app/api-reference/agents/save-template.md) - [Disable Auto Top Up](https://contextualai-new-home-nav.mintlify.app/api-reference/billing/disable-auto-top-up.md): Enable auto top-up for a tenant with a balance threshold and a top-up amount or Disable auto top-up for a tenant. - [Enable Auto Top Up](https://contextualai-new-home-nav.mintlify.app/api-reference/billing/enable-auto-top-up.md): Enable auto top-up for a tenant with a balance threshold and a top-up amount or Disable auto top-up for a tenant. - [Get Auto Top Up Status](https://contextualai-new-home-nav.mintlify.app/api-reference/billing/get-auto-top-up-status.md): Get the auto top-up status for a tenant. - [Get Balance](https://contextualai-new-home-nav.mintlify.app/api-reference/billing/get-balance.md): Get the remaining balance for a tenant - [Get Billing Metadata](https://contextualai-new-home-nav.mintlify.app/api-reference/billing/get-billing-metadata.md): Non admin endpoint for getting the billing metadata for a tenant. - [Get Billing Mode History](https://contextualai-new-home-nav.mintlify.app/api-reference/billing/get-billing-mode-history.md): Get the billing mode history for a tenant for a specific month. Args: request: Request object containing year and month with validation user_context: User context with tenant admin permissions Returns: Billing mode history records for the specified month and year Returns at least one entry which is the mode of the first date of the given month, with potential mode changes in the middle of the month. If no record found, defaults to LEGACY mode. - [Get Earliest Usage Date Endpoint](https://contextualai-new-home-nav.mintlify.app/api-reference/billing/get-earliest-usage-date-endpoint.md): Get the earliest usage date for a tenant - [Get Monthly Usage Endpoint](https://contextualai-new-home-nav.mintlify.app/api-reference/billing/get-monthly-usage-endpoint.md): Get monthly usage data for a tenant with validation for year and month parameters. Args: request: Request object containing year and month with validation user_context: User context with tenant admin permissions resource_id: Optional[UUID]. If provided, get usage data for a specific resource. Otherwise, get aggregated usage data across all resources. Returns: Monthly usage records for the specified month and year - [Get Top Up History Endpoint](https://contextualai-new-home-nav.mintlify.app/api-reference/billing/get-top-up-history-endpoint.md): Get the top-up history for a tenant. Paginated. - [Increment Balance](https://contextualai-new-home-nav.mintlify.app/api-reference/billing/increment-balance.md): Increment the balance of a tenant - [Get Content Metadata](https://contextualai-new-home-nav.mintlify.app/api-reference/contents/get-content-metadata.md) - [Get Document Contents](https://contextualai-new-home-nav.mintlify.app/api-reference/contents/get-document-contents.md) - [Delete Document](https://contextualai-new-home-nav.mintlify.app/api-reference/datastores-documents/delete-document.md): Delete a given document from its `Datastore`. This operation is irreversible. - [Edit Chunk Content](https://contextualai-new-home-nav.mintlify.app/api-reference/datastores-documents/edit-chunk-content.md): Edit the content of a specific chunk in a datastore. This operation updates the chunk's text content and regenerates its embeddings. - [Get Document Metadata](https://contextualai-new-home-nav.mintlify.app/api-reference/datastores-documents/get-document-metadata.md): Get details of a given document, including its `name` and ingestion job `status`. - [Get Parse Results](https://contextualai-new-home-nav.mintlify.app/api-reference/datastores-documents/get-parse-results.md): Get the parse results that are generated during ingestion for a given document. Retrieving parse results for existing documents ingested before the release of this endpoint is not supported and will return a 404 error. - [Ingest Document](https://contextualai-new-home-nav.mintlify.app/api-reference/datastores-documents/ingest-document.md): Ingest a document into a given `Datastore`. Ingestion is an asynchronous task. Returns a document `id` which can be used to track the status of the ingestion job through calls to the `GET /datastores/{datastore_id}/documents/{document_id}/metadata` API. This `id` can also be used to delete the document through the `DELETE /datastores/{datastore_id}/documents/{document_id}` API. `file` must be a PDF, HTML, DOC(X) or PPT(X) file. The filename must end with one of the following extensions: `.pdf`, `.html`, `.htm`, `.mhtml`, `.doc`, `.docx`, `.ppt`, `.pptx`. - [List Documents](https://contextualai-new-home-nav.mintlify.app/api-reference/datastores-documents/list-documents.md): Get list of documents in a given `Datastore`, including document `id`, `name`, and ingestion job `status`. Performs `cursor`-based pagination if the number of documents exceeds the requested `limit`. The returned `cursor` can be passed to the next `GET /datastores/{datastore_id}/documents` call to retrieve the next set of documents. - [Update Document Metadata](https://contextualai-new-home-nav.mintlify.app/api-reference/datastores-documents/update-document-metadata.md): Post details of a given document that will enrich the chunk and be added to the context or just for filtering. If Just for filtering, start with "_" in the key. - [Create Datastore](https://contextualai-new-home-nav.mintlify.app/api-reference/datastores/create-datastore.md): Create a new `Datastore`. A `Datastore` is a collection of documents. Documents can be ingested into and deleted from a `Datastore`. A `Datastore` can be linked to one or more `Agents`, and conversely, an `Agent` can be associated with one or more `Datastores` to ground its responses with relevant data. This flexible many-to-many relationship allows `Agents` to draw from multiple sources of information. This linkage of `Datastore` to `Agent` is done through the `Create Agent` or `Edit Agent` APIs. > Note that self-serve users are currently required to create datastores through our UI. Otherwise, they will receive the following message: "This endpoint is disabled as you need to go through checkout. Please use the UI to make this request." - [Delete Datastore](https://contextualai-new-home-nav.mintlify.app/api-reference/datastores/delete-datastore.md): Delete a given `Datastore`, including all the documents ingested into it. This operation is irreversible. This operation will fail with status code 400 if there is an active `Agent` associated with the `Datastore`. - [Edit Datastore Configuration](https://contextualai-new-home-nav.mintlify.app/api-reference/datastores/edit-datastore-configuration.md) - [Get Datastore Metadata](https://contextualai-new-home-nav.mintlify.app/api-reference/datastores/get-datastore-metadata.md): Get the details of a given `Datastore`, including its name, create time, and the list of `Agents` which are currently configured to use the `Datastore`. - [List Datastores](https://contextualai-new-home-nav.mintlify.app/api-reference/datastores/list-datastores.md): Retrieve a list of `Datastores`. Performs `cursor`-based pagination if the number of `Datastores` exceeds the requested `limit`. The returned `cursor` can be passed to the next `GET /datastores` call to retrieve the next set of `Datastores`. - [Reset Datastore](https://contextualai-new-home-nav.mintlify.app/api-reference/datastores/reset-datastore.md): Reset the give `Datastore`. This operation is irreversible and it deletes all the documents associated with the datastore. - [Create Schema](https://contextualai-new-home-nav.mintlify.app/api-reference/extract/create-schema.md): Create a new extraction schema. Creates a JSON Schema that defines the structure of data to extract from documents. The schema must conform to our supported subset of JSON Schema 2020-12 features. Supported Schema Features: Basic Types: 1. string: Text data with optional constraints (minLength, maxLength, pattern, enum) 2. integer: Whole numbers with optional constraints (minimum, maximum, enum) 3. number: Decimal numbers with optional constraints (minimum, maximum, enum) 4. boolean: True/false values 5. null: Null values (often used with anyOf for optional fields) Complex Types: 1. object: Key-value pairs with defined properties 2. array: Lists of items with defined item schemas 3. anyOf: Union types (e.g., string or null for optional fields) String Formats: Supported formats: date-time, time, date, duration, email, hostname, ipv4, ipv6, uuid, uri Schema Structure: 1. Root schema must be an object type 2. Use $defs for reusable schema components 3. Use $ref to reference definitions 4. Arrays must have items schema defined Constraints: 1. Maximum 10 leaf nodes per array (prevents overly complex schemas) 2. No circular references in $ref definitions 3. String formats must be from the supported list Example Schemas: Simple Company Schema: ```json { "type": "object", "properties": { "company_name": { "type": "string", "description": "The name of the company exactly as it appears in the document" }, "form_type": { "type": "string", "enum": ["10-K", "10-Q", "8-K", "S-1"], "description": "The type of SEC form" }, "trading_symbol": { "type": "string", "description": "The trading symbol of the company" }, "zip_code": { "type": "integer", "description": "The zip code of the company headquarters" } }, "required": ["company_name", "form_type", "trading_symbol", "zip_code"] } ``` Complex Resume Schema: ```json { "type": "object", "properties": { "personalInfo": { "type": "object", "properties": { "fullName": {"type": "string"}, "contact": { "type": "object", "properties": { "emails": { "type": "array", "items": {"type": "string", "format": "email"} }, "phones": { "type": "array", "items": {"type": "string"} } } } }, "required": ["fullName"] }, "workExperience": { "type": "array", "items": { "type": "object", "properties": { "jobTitle": {"type": "string"}, "company": {"type": "string"}, "startDate": {"type": "string"}, "endDate": {"type": ["string", "null"]}, "isCurrent": {"type": "boolean"} }, "required": ["jobTitle", "company", "startDate"] } } }, "required": ["personalInfo", "workExperience"] } ``` Schema with References: ```json { "type": "object", "properties": { "algorithms": { "type": "array", "items": {"$ref": "#/$defs/algorithm"} } }, "$defs": { "algorithm": { "type": "object", "properties": { "name": {"type": "string"}, "description": {"type": "string"} }, "required": ["name"] } } } ``` Best Practices: 1. Use descriptive field names that clearly indicate what data should be extracted 2. Add detailed descriptions to help the AI understand what to extract 3. Use enums for known values (e.g., form types, status values) 4. Make fields optional by using anyOf with null or omitting from required 5. Use arrays for lists of similar items (e.g., work experience, education) 6. Keep schemas focused - avoid overly complex nested structures 7. Test with sample documents to ensure the schema captures the expected data - [Delete Document](https://contextualai-new-home-nav.mintlify.app/api-reference/extract/delete-document.md): Delete a document. - [Delete Schema](https://contextualai-new-home-nav.mintlify.app/api-reference/extract/delete-schema.md): Delete a schema. - [Get Document](https://contextualai-new-home-nav.mintlify.app/api-reference/extract/get-document.md): Get document information by ID. - [Get Job Results](https://contextualai-new-home-nav.mintlify.app/api-reference/extract/get-job-results.md): Get the results of a completed extraction job. - [Get Job Status](https://contextualai-new-home-nav.mintlify.app/api-reference/extract/get-job-status.md): Get the status of an extraction job. - [Get Schema](https://contextualai-new-home-nav.mintlify.app/api-reference/extract/get-schema.md): Get schema information by ID. - [List Documents](https://contextualai-new-home-nav.mintlify.app/api-reference/extract/list-documents.md): List documents for structured extraction. - [List Jobs](https://contextualai-new-home-nav.mintlify.app/api-reference/extract/list-jobs.md): List extraction jobs. - [List Schemas](https://contextualai-new-home-nav.mintlify.app/api-reference/extract/list-schemas.md): List schemas with optional search. - [Start Extraction Job](https://contextualai-new-home-nav.mintlify.app/api-reference/extract/start-extraction-job.md): Start a new structured extraction job. Extracts structured data from a PDF document using AI models based on a JSON Schema. The document_id and schema_id must be valid UUIDs of previously uploaded documents and created schemas. How It Works: 1. Document Processing: The system analyzes the PDF document and splits it into manageable sections 2. Schema Analysis: Your JSON schema is parsed and validated for supported features 3. AI Extraction: The AI model processes each section and extracts data according to your schema 4. Validation: Extracted data is validated against your schema to ensure accuracy 5. Results: Structured data is returned in the format defined by your schema Supported Models: 1. gemini-2.5-flash: Fast, cost-effective model for most use cases (default) 2. gemini-2.5-pro: More powerful model for complex extractions Configuration Options: Basic Settings: 1. model: AI model to use for extraction 2. max_num_concurrent_requests: Number of parallel processing requests (1-20) 3. validate_response_schema: Whether to validate extracted data against schema Advanced Settings: 1. per_key_attribution: Enable detailed reasoning and confidence scores for each field 2. temperature: Control randomness in AI responses (0.0-2.0) 3. seed: Set random seed for reproducible results 4. enable_thinking: Show AI reasoning process 5. n_max_retries: Maximum retry attempts for failed requests Job Lifecycle: 1. pending: Job is queued and waiting to start 2. processing: AI is actively extracting data from the document 3. completed: Extraction finished successfully with results 4. failed: Extraction failed due to an error 5. cancelled: Job was cancelled before completion Monitoring Progress: Use the /jobs/{job_id} endpoint to check job status and progress: 1. completion_percentage: Overall progress (0-100) 2. current_step: Current processing stage 3. fields_processed: Number of schema fields completed 4. estimated_remaining_time: Time until completion Getting Results: Once a job is completed, use /jobs/{job_id}/results to retrieve: 1. results: Extracted data conforming to your schema 2. metadata: Processing information, costs, and performance metrics 3. attributions: (if enabled) Reasoning and confidence scores for each field Example Request: ```json { "document_id": "123e4567-e89b-12d3-a456-426614174000", "schema_id": "987fcdeb-51a2-43d1-b456-426614174000", "config": { "model": "gemini-2.5-flash", "per_key_attribution": true, "temperature": 0.1, "enable_thinking": true } } ``` Example Response: ```json { "job_id": "456e7890-e89b-12d3-a456-426614174000", "status": "pending", "created_at": "2025-01-11T18:35:00Z", "estimated_completion": "2025-01-11T18:40:00Z" } ``` Error Handling: Status 400: Bad Request (invalid document_id or schema_id format) Status 404: Not Found (document or schema not found) Status 422: Unprocessable Entity (invalid schema definition) Status 500: Internal Server Error (processing error) - [Update Schema](https://contextualai-new-home-nav.mintlify.app/api-reference/extract/update-schema.md): Update an existing schema. - [Upload Document](https://contextualai-new-home-nav.mintlify.app/api-reference/extract/upload-document.md): Upload a document for structured extraction. Uploads a PDF document that can be used for structured data extraction. Only PDF files are supported. Supported File Types: 1. PDF files only (.pdf extension) 2. Maximum file size: 50MB (recommended) 3. Documents are processed and validated upon upload Document Processing: 1. File size and page count are automatically calculated 2. Document is validated for PDF format and readability 3. Metadata is extracted and stored for future reference 4. Document is stored securely and can be referenced by ID Usage: After uploading, you'll receive a document_id that can be used with: 1. /jobs endpoint to start extraction jobs 2. /documents/{document_id} to retrieve document information 3. /documents/{document_id} DELETE to remove the document Example Response: ```json { "document_id": "123e4567-e89b-12d3-a456-426614174000", "file_name": "financial_report.pdf", "file_size": 2048576, "page_count": 45, "uploaded_at": "2025-01-11T18:35:00Z", "status": "uploaded" } ``` - [Generate](https://contextualai-new-home-nav.mintlify.app/api-reference/generate/generate.md): Generate a response using Contextual's Grounded Language Model (GLM), an LLM engineered specifically to prioritize faithfulness to in-context retrievals over parametric knowledge to reduce hallucinations in Retrieval-Augmented Generation and agentic use cases. The total request cannot exceed 32,000 tokens. See our [blog post](https://contextual.ai/blog/introducing-grounded-language-model/) and [code examples](https://colab.research.google.com/github/ContextualAI/examples/blob/main/03-standalone-api/02-generate/generate.ipynb). Email [glm-feedback@contextual.ai](mailto:glm-feedback@contextual.ai) with any feedback or questions. - [LMUnit](https://contextualai-new-home-nav.mintlify.app/api-reference/lmunit/lmunit.md): Given a `query`, `response`, and a `unit_test`, return the response's `score` on the unit test on a 5-point continuous scale. The total input cannot exceed 7000 tokens. See a code example in [our blog post](https://contextual.ai/news/lmunit/). Email [lmunit-feedback@contextual.ai](mailto:lmunit-feedback@contextual.ai) with any feedback or questions. >🚀 Obtain an LMUnit API key by completing [this form](https://contextual.ai/request-lmunit-api/) - [Parse File](https://contextualai-new-home-nav.mintlify.app/api-reference/parse/parse-file.md): Parse a file into a structured Markdown and/or JSON. Files must be less than 100MB and 400 pages. We use LibreOffice to convert DOC(X) and PPT(X) files to PDF, which may affect page count. See our [blog post](https://contextual.ai/blog/document-parser-for-rag) and [code examples](https://github.com/ContextualAI/examples/blob/main/03-standalone-api/04-parse/parse.ipynb). Email [parse-feedback@contextual.ai](mailto:parse-feedback@contextual.ai) with any feedback or questions. - [Parse List Jobs](https://contextualai-new-home-nav.mintlify.app/api-reference/parse/parse-list-jobs.md): Get list of parse jobs, sorted from most recent to oldest. Returns all jobs from the last 30 days, or since the optional `uploaded_after` timestamp. - [Parse Result](https://contextualai-new-home-nav.mintlify.app/api-reference/parse/parse-result.md): Get the results of a parse job. Parse job results are retained for up to 30 days after job creation. Fetching results for a parse job that is older than 30 days will return a 404 error. - [Parse Status](https://contextualai-new-home-nav.mintlify.app/api-reference/parse/parse-status.md): Get the status of a parse job. Parse job results are retained for up to 30 days after job creation. Fetching a status for a parse job that is older than 30 days will return a 404 error. - [Rerank](https://contextualai-new-home-nav.mintlify.app/api-reference/rerank/rerank.md): Rank a list of documents according to their relevance to a query primarily and your custom instructions secondarily. We evaluated the model on instructions for recency, document type, source, and metadata, and it can generalize to other instructions as well. The reranker supports multilinguality. The total request cannot exceed 400,000 tokens. The combined length of the query, instruction and any document with its metadata must not exceed 8,000 tokens. See our [blog post](https://contextual.ai/blog/introducing-instruction-following-reranker/) and [code examples](https://colab.research.google.com/github/ContextualAI/examples/blob/main/03-standalone-api/03-rerank/rerank.ipynb). Email [rerank-feedback@contextual.ai](mailto:rerank-feedback@contextual.ai) with any feedback or questions. - [Get Users](https://contextualai-new-home-nav.mintlify.app/api-reference/users/get-users.md): Retrieve a list of `users`. - [Invite Users](https://contextualai-new-home-nav.mintlify.app/api-reference/users/invite-users.md): Invite users to the tenant. This checks if the user is already in the tenant and if not, creates the user. We will return a list of user emails that were successfully created (including existing users). - [Remove User](https://contextualai-new-home-nav.mintlify.app/api-reference/users/remove-user.md): Delete a given `user`. - [Update User](https://contextualai-new-home-nav.mintlify.app/api-reference/users/update-user.md): Modify a given `User`. Fields not included in the request body will not be modified. - [Get Consent](https://contextualai-new-home-nav.mintlify.app/api-reference/workspaces/get-consent.md): Retrieve the current consent status for the workspace. - [Update Consent](https://contextualai-new-home-nav.mintlify.app/api-reference/workspaces/update-consent.md): Update the consent status for the workspace. - [Auto & Manual Syncing](https://contextualai-new-home-nav.mintlify.app/connectors/auto-manual-syncing.md): Detailed instructions on how to set up Auto & Manual Syncing - [Box](https://contextualai-new-home-nav.mintlify.app/connectors/box.md): Connect your Box documents to Contextual AI - [Entitlements Enforcement](https://contextualai-new-home-nav.mintlify.app/connectors/entitlements-enforcement.md): Using your Connector with Entitlements Enforcement - [Google Drive](https://contextualai-new-home-nav.mintlify.app/connectors/google-drive.md): Connect your Google Drive documents to Contextual AI - [Local File Upload](https://contextualai-new-home-nav.mintlify.app/connectors/local-file-upload.md): Upload your documents to Contextual AI - [Microsoft OneDrive](https://contextualai-new-home-nav.mintlify.app/connectors/microsoft-onedrive.md): Connect your Microsoft OneDrive documents to Contextual AI - [Microsoft SharePoint](https://contextualai-new-home-nav.mintlify.app/connectors/microsoft-sharepoint.md): Connect your Microsoft SharePoint documents to Contextual AI - [Overview](https://contextualai-new-home-nav.mintlify.app/connectors/overview.md): Connecting your data to Contextual AI - [Fun Demos](https://contextualai-new-home-nav.mintlify.app/examples/fun-demos.md): Explore real-world use cases and live demos - [Contextual AI Demos](https://contextualai-new-home-nav.mintlify.app/examples/overview-demos.md): Explore real-world use cases and live demos - [RAG Agent](https://contextualai-new-home-nav.mintlify.app/examples/rag-agent.md): Explore real-world use cases and live demos - [Google Sheets Tutorial](https://contextualai-new-home-nav.mintlify.app/examples/tutorial-google-sheets.md): Explore real-world use cases and live demos - [RAG Evaluation with Ragas](https://contextualai-new-home-nav.mintlify.app/examples/tutorial-rag-eval-ragas.md): Explore real-world use cases and live demos - [Basic Queries](https://contextualai-new-home-nav.mintlify.app/how-to-guides/basic-queries.md): Running Basic Agent Queries - [Collecting & Annotating Feedback](https://contextualai-new-home-nav.mintlify.app/how-to-guides/feedback.md): Collecting user feedback and annotating it to identify and triage issues. - [Generate](https://contextualai-new-home-nav.mintlify.app/how-to-guides/generate.md): Contextual AI How-to Guide - [LMUnit](https://contextualai-new-home-nav.mintlify.app/how-to-guides/lmunit.md): Contextual AI How-to Guide - [Contextual AI MCP Server](https://contextualai-new-home-nav.mintlify.app/how-to-guides/mcp-server-user-guide.md): How-to Guide - [Multi-turn Conversations](https://contextualai-new-home-nav.mintlify.app/how-to-guides/multi-turn-conversations.md): Contextual AI How-to Guide - [n8n Community Node](https://contextualai-new-home-nav.mintlify.app/how-to-guides/n8n.md): Contextual AI How-to Guide - [Parse](https://contextualai-new-home-nav.mintlify.app/how-to-guides/parse.md): Contextual AI How-to Guide - [Rerank](https://contextualai-new-home-nav.mintlify.app/how-to-guides/rerank.md): Contextual AI How-to Guide - [Snowflake Native App](https://contextualai-new-home-nav.mintlify.app/how-to-guides/snowflake.md): Build secure and grounded Contextual AI agents natively in Snowflake - [Structured Outputs](https://contextualai-new-home-nav.mintlify.app/how-to-guides/structured-outputs.md): Contextual AI How-to Guide - [Databases](https://contextualai-new-home-nav.mintlify.app/integration/databases.md): Connecting your private data and third-party data sources - [Frameworks](https://contextualai-new-home-nav.mintlify.app/integration/frameworks.md): Integrations with leading AI/ML frameworks - [Hugging Face](https://contextualai-new-home-nav.mintlify.app/integration/hugging-face.md) - [Integrations Ecosystem](https://contextualai-new-home-nav.mintlify.app/integration/overview.md): Explore Contextual AI's integrations catalog - [Platforms](https://contextualai-new-home-nav.mintlify.app/integration/platforms.md): Integrations with leading AI/ML and data platforms - [Tooling](https://contextualai-new-home-nav.mintlify.app/integration/tooling.md): Integrations with popular tools - [Generate](https://contextualai-new-home-nav.mintlify.app/quickstarts/generate.md): Contextual AI Component Quickstart - [Getting Started](https://contextualai-new-home-nav.mintlify.app/quickstarts/getting-started.md): Everything you need to get up and running with Contextual AI - [LMUnit](https://contextualai-new-home-nav.mintlify.app/quickstarts/lmunit.md): Contextual AI Component Quickstart - [Contextual AI MCP Server](https://contextualai-new-home-nav.mintlify.app/quickstarts/mcp-server.md): Integrate Contextual MCP server with compatible AI clients - [Parse](https://contextualai-new-home-nav.mintlify.app/quickstarts/parse.md): Contextual AI Component Quickstart - [Contextual AI Platform](https://contextualai-new-home-nav.mintlify.app/quickstarts/platform.md): Create a specialized RAG agent in less than 5 minutes - [Rerank](https://contextualai-new-home-nav.mintlify.app/quickstarts/rerank.md): Contextual AI Component Quickstart - [Settings & Parameters](https://contextualai-new-home-nav.mintlify.app/reference/agent-config-overview.md): Learn how to configure and optimize Contextual AI - [Check Retrieval Need](https://contextualai-new-home-nav.mintlify.app/reference/check-retrieval-need.md): `should_check_retrieval_need` - [Core System Prompt](https://contextualai-new-home-nav.mintlify.app/reference/core-system-prompt.md): `(system_prompt)` - [Datastores](https://contextualai-new-home-nav.mintlify.app/reference/datastores.md): `(datastore_ids)` - [Disable Commentary](https://contextualai-new-home-nav.mintlify.app/reference/disable-commentary.md): `(avoid_commentary)` - [Enable Filtering](https://contextualai-new-home-nav.mintlify.app/reference/enable-filtering.md): `(enable_filter)` - [Enable Groundedness Score](https://contextualai-new-home-nav.mintlify.app/reference/enable-groundedness-score.md): `(calculate_groundedness)` - [Enable Multi-turn](https://contextualai-new-home-nav.mintlify.app/reference/enable-multi-turn.md): `enable_multi_turn` - [Enable Query Decomposition](https://contextualai-new-home-nav.mintlify.app/reference/enable-query-decomposition.md): `(enable_query_decomposition)` - [Enable Query Expansion](https://contextualai-new-home-nav.mintlify.app/reference/enable-query-expansion.md): `enable_query_expansion` - [Enable Reranking](https://contextualai-new-home-nav.mintlify.app/reference/enable-reranking.md): `(enable_rerank)` - [Filter Prompt](https://contextualai-new-home-nav.mintlify.app/reference/filter-prompt.md): `(filter_prompt)` - [Frequency Penalty](https://contextualai-new-home-nav.mintlify.app/reference/frequency-penalty.md): `(frequency_penalty)` - [Generation Model](https://contextualai-new-home-nav.mintlify.app/reference/generation-model.md): Selecting Your Generation Model - [Glossary](https://contextualai-new-home-nav.mintlify.app/reference/glossary.md): Essential definitions for understanding and using Contextual AI - [Lexical Search Weight](https://contextualai-new-home-nav.mintlify.app/reference/lexical-search-weight.md): `(lexical_alpha)` - [Max New Tokens](https://contextualai-new-home-nav.mintlify.app/reference/max-new-tokens.md): `(max_new_tokens)` - [No Retrieval System Prompt](https://contextualai-new-home-nav.mintlify.app/reference/no-retrieval-system-prompt.md): `(no_retrieval_system_prompt)` - [Number of Reranked Chunks](https://contextualai-new-home-nav.mintlify.app/reference/number-of-reranked-chunks.md): `(top_k_reranked_chunks)` - [Number of Retrieved Chunks](https://contextualai-new-home-nav.mintlify.app/reference/number-of-retrieved-chunks.md): `(top_k_retrieved_chunks)` - [Random Seed](https://contextualai-new-home-nav.mintlify.app/reference/random-seed.md): `(seed)` - [Rerank Instructions](https://contextualai-new-home-nav.mintlify.app/reference/rerank-instructions.md): `(rerank_instructions)` - [Reranker Score Filter](https://contextualai-new-home-nav.mintlify.app/reference/reranker-score-filter.md): `(reranker_score_filter_threshold)` - [Semantic Search Weight](https://contextualai-new-home-nav.mintlify.app/reference/semantic-search-weight.md): `(semantic_alpha)` - [Suggested Queries](https://contextualai-new-home-nav.mintlify.app/reference/suggested-queries.md): `(suggested_queries)` - [Temperature](https://contextualai-new-home-nav.mintlify.app/reference/temperature.md): `(temperature)` - [Top P](https://contextualai-new-home-nav.mintlify.app/reference/top-p.md): `(top_p)` - [2025 Updates](https://contextualai-new-home-nav.mintlify.app/releases/releases-2025.md): Product Highlights & Release Notes - [Node.js SDK](https://contextualai-new-home-nav.mintlify.app/sdks/node.md) - [Python SDK](https://contextualai-new-home-nav.mintlify.app/sdks/python.md)