Skip to content

Home

Pagelore Pagelore

The open-source retrieval layer for any AI app

Turn files, web pages, S3 buckets and raw text into searchable, citation-ready knowledge, using the vector database and embedding model you choose.

Get started View on GitHub

Pagelore is a RAG (retrieval-augmented generation) backend built on FastAPI. You give it documents of almost any kind. It extracts the text, chunks it the way you choose, embeds the chunks and indexes them in your vector database. Your app sends a question and gets back the most relevant passages, each with a ready-made citation such as report.pdf, pages 3-4, Refunds > Terms.

Pagelore is the semantic layer only. It never uses an LLM to answer questions: that stays with your app, so any chatbot, agent or AI product can use it with any model. The embedding model, the vector database and the reranker can each be swapped through configuration.

Features

  • Ingest anything


    24 loaders and 266 file extensions: PDF, Office, OpenDocument, EPUB, HTML, spreadsheets, JSON, SQLite, notebooks, mail and about 60 programming languages. OCR handles images and transcription handles audio and video. ZIP and TAR archives are expanded.

    File types

  • Web, S3 and text


    One URL or a whole site, following links and sitemaps while obeying robots.txt. S3 and S3-compatible storage. Text and JSON sent in the request body. Sync re-indexes only what changed.

    Sources

  • Docling, optional


    Swap the built-in loaders for Docling: layout analysis, reading order, table structure and OCR. Choose it per server, per project or per upload.

    Docling

  • 12 chunking strategies


    Recursive, semantic, code-aware, Markdown, table, JSON, page and more, plus contextual headers, LLM-written chunk contexts and parent chunks.

    Chunking

  • Retrieve precisely


    Vector, keyword (BM25) and hybrid search, with RRF or relative-score fusion. Metadata filters, MMR diversity, de-duplication, neighbouring chunks and searches across several projects.

    Retrieval

  • 13 rerankers


    Local cross-encoders, Cohere, Voyage, Jina, Bedrock, Vertex AI and any /rerank server. Small-to-big retrieval returns the larger passage around each precise match.

    Reranking

  • Bring your own stack


    9 vector databases (Qdrant, Chroma, Pinecone, Weaviate, Milvus, pgvector, FAISS, LanceDB, Elasticsearch) and 18 embedding providers.

    Configuration

  • Measure it


    Generate test questions from your own data and compare search settings: hit rate, MRR, nDCG, recall, precision and latency.

    Evaluation

  • Built for production


    Postgres is the source of truth, with migrations that are safe for replicas, document versioning, stale-index detection, SSRF protection, Docker Compose and Python 3.10 to 3.15.

    Architecture

How it works

flowchart LR
    subgraph Sources
        A["Uploads<br/>(ZIP / TAR)"]
        B["Text and JSON"]
        C["Web pages<br/>and sitemaps"]
        D["S3 / MinIO / R2"]
    end

    Sources --> L["Loaders<br/>24 loaders, OCR, transcription"]
    L --> CH["Chunkers<br/>12 strategies"]
    CH --> EM["Embedding provider"]
    EM --> VDB[("Vector DB")]
    CH --> PG[("Postgres<br/>documents, chunks,<br/>metadata, BM25 index")]

    Q(["Query"]) --> R["Retrieval<br/>vector / keyword / hybrid"]
    VDB --> R
    PG --> R
    R --> RR["Reranker<br/>(optional)"]
    RR --> OUT(["Passages + citations<br/>for your LLM or app"])
  1. Ingest: each source becomes a document in a project. Its text is extracted together with its structure: pages, slides, sections, timestamps and table rows.
  2. Chunk: the text is split with the strategy you pick, and every chunk keeps its location. Optionally, consecutive chunks are also grouped into larger parents.
  3. Index: chunks are embedded and written to the vector DB. Postgres stores the chunk text, your metadata and a full-text (BM25) index.
  4. Retrieve: a query is matched by meaning, by keywords or by both. The candidates are filtered, collapsed into their parents (if any) and optionally reranked. The best ones are returned with citations. Chunk text always comes from Postgres, so results match the stored documents.

In four requests

# Create a project (it gets its own vector collection)
curl -X POST localhost:8000/api/v1/projects -H 'Content-Type: application/json' \
     -d '{"project_name": "handbook"}'

# Add documents: files, a website, or text
curl -X POST localhost:8000/api/v1/projects/1/documents -F files=@handbook.pdf
curl -X POST localhost:8000/api/v1/projects/1/documents/url -H 'Content-Type: application/json' \
     -d '{"urls": ["https://docs.example.com/"], "max_depth": 2}'

# Ask
curl -X POST localhost:8000/api/v1/projects/1/retrieve -H 'Content-Type: application/json' \
     -d '{"query": "How many vacation days do I get?", "mode": "hybrid", "top_k": 3}'

Pass each result's text and citation to your LLM. The quick start walks through the whole flow.

Where to go next