Skip to main content
Contextual AI provides enterprise-grade components for building production RAG agents. It offers state-of-the-art document parsing, reranking, generation, and evaluation capabilities that integrate seamlessly with Chroma as the vector database. Contextual AI’s tools enable developers to build document intelligence applications with advanced parsing, instruction-following reranking, grounded generation with minimal hallucinations, and natural language testing for response quality. | Docs | GitHub | Examples | Blog | You can use Chroma together with Contextual AI’s Parse, Rerank, Generate, and LMUnit APIs to build and evaluate comprehensive RAG pipelines.

Installation

Complete RAG Pipeline

Parse documents and store in Chroma

Query Chroma and rerank results with custom instructions

Generate grounded response

Evaluate response quality with LMUnit

Advanced Usage

For more advanced usage examples including table extraction, document hierarchy preservation, and multi-document RAG pipelines, please refer to the comprehensive examples in our Jupyter notebooks:

Components

Parse API

Advanced document parsing that handles PDFs, DOCX, and PPTX files with:
  • Document hierarchy preservation through parent-child relationships
  • Intelligent table extraction with automatic splitting for large tables
  • Multiple output formats: markdown-document, markdown-per-page, blocks-per-page
  • Figure and caption extraction
Parse API Documentation

Rerank API

State-of-the-art reranker with instruction-following capabilities:
  • BEIR benchmark-leading accuracy
  • Custom reranking instructions for domain-specific requirements
  • Handles conflicting retrieval results
  • Multi-lingual support
Models: ctxl-rerank-v2-instruct-multilingual, ctxl-rerank-v2-instruct-multilingual-mini, ctxl-rerank-v1-instruct Rerank API Documentation

Generate API (GLM)

Grounded Language Model optimized for minimal hallucinations:
  • Industry-leading groundedness for RAG applications, currently #1 on the FACTS Grounding benchmark from Google DeepMind
  • Knowledge attribution for source transparency
  • Conversational context support
  • Optimized for enterprise use cases
Supported Models: v1, v2 Generate API Documentation

LMUnit API

Natural language unit testing for LLM response evaluation:
  • State-of-the-art response quality assessment
  • Structured testing methodology
  • Domain-agnostic evaluation framework
  • API-based evaluation at scale
Scoring Scale (Continuous 1-5):
  • 5: Excellent - Fully satisfies criteria
  • 4: Good - Minor issues
  • 3: Acceptable - Some issues
  • 2: Poor - Significant issues
  • 1: Unacceptable - Fails criteria
LMUnit Documentation