LoginGet a DemoStart for FreeLogin
DocsPricing

Contextual AI

Contextual AI Components

State-of-the-art component APIs to enhance every step of your RAG pipeline

Core RAG Building Blocks

Optimize your RAG pipeline end-to-end with APIs for document understanding, reranking, generation, and evaluation

State-of-the-art Performance

Ground agents in your enterprise knowledge with RAG components that outperform competing tools on leading benchmarks

Simple, Flexible Integration

Incorporate components into your existing RAG pipeline without needing to overhaul your entire architecture

Achieve even greater performance with the Contextual AI Platform

Each component API provides state-of-the-art performance. Our end-to-end platform delivers even greater performance and simplicity by jointly optimizing and orchestrating the components as a single, unified system.

Flexible, modular components

Parse

Extract complex multimodal content from any document

Convert unstructured documents into structured output optimized for your RAG pipeline

Easily process text, charts, tables, code, and other complex modalities

Infer document hierarchy and add positional metadata to each chunk, enabling agents to connect information across hundreds of pages

Rerank

Resolve knowledge conflicts with the only instruction-following reranker

Steer how your reranker prioritizes information with natural language instructions

Serve the most relevant content to your model’s context—with or without instructions

Drop into your existing RAG pipeline with just a few lines of code

Generate

Maximize accuracy with the world’s most grounded language model

Generate answers strongly grounded in your retrieved documents
Minimize hallucinations with response tags to delineate between facts and model commentary
Provide in-line attributions to source documents for end-users to verify responses

LMUnit

Evaluate LLM responses with fine-grained natural language unit tests

Assess responses for your defined criteria, like conciseness, technical precision, and more
Test for accuracy with out-of-the-box evaluation tests for equivalence and groundedness
Reduce your dependence on end-user testing and get to production faster

Simple APIs to improve any RAG pipeline

Simple APIs to improve any RAG pipeline

# Convert unstructured content into structured output

import os
from contextual import ContextualAI

client = ContextualAI(api_key=os.environ.get("CONTEXTUAL_API_KEY"))

with open("your filepath", "rb") as fp:
    response = client.parse.create(
        raw_file=fp,
        parse_mode="standard",
        figure_caption_mode="concise",
        enable_document_hierarchy=True,
        page_range="0-5",
    )

job_id = response.job_id

results = client.parse.job_results(job_id, output_types=['markdown-per-page'])

Testimonial

"At ClaimWise, we work with complex patents and scientific articles. Meeting the quality expectations of our users has always been one of our main technical challenges. The Contextual Al reranker's instruction-following capability is great; we have some nuanced requirements about how to prioritize different types of paragraphs for different fields of invention, and the reranker follows those instructions well."

Milo Moerkerke - Co-founder at Claimwise

See why enterprises trust our platform

Build an AI agent in minutes that instantly understands your complex documents and data