Back to blog
Guide

Free RAG Knowledge Base: Train Your AI on Your Own Documents

Upload PDFs or text files. Get cited answers grounded in your content. No GPU, no credit card, no nonsense.

June 2025·7 min read

What is RAG and why does it matter?

RAG stands for Retrieval-Augmented Generation. Instead of asking a general-purpose AI model to answer from memory — where it can hallucinate or confidently give outdated information — RAG grounds every answer in documents you provide.

The model searches your knowledge base, pulls the most relevant chunks, and generates an answer that cites exactly where it came from. You get accuracy you can verify, not guesses you have to second-guess.

What "free" actually means on Lexora

Lexora's RAG knowledge base is free to create and free to train. That covers:

  • Uploading PDFs and TXT files
  • Automatic text extraction, chunking, and embedding (via BGE-M3)
  • Storing your knowledge base in pgvector
  • Querying your KB through the dashboard

The only thing that costs tokens is the chat model generating the final answer — and Lexora's in-house Qwen3 8B starts at $0.10 per million tokens, so even heavy usage stays negligible.

How the pipeline works

When you upload a file, Lexora's worker network handles the full ingest pipeline:

  • Extraction — text is pulled from your PDF or TXT file
  • Chunking — content is split into ~1,000-token segments with 150-token overlap so context isn't lost at boundaries
  • Embedding — each chunk is encoded with BGE-M3, a multilingual 1024-dimension embedding model running on CPU workers
  • Indexing — vectors land in pgvector where they're indexed for fast cosine similarity search

When you ask a question, the same BGE-M3 encodes your query, finds the closest matching chunks, and those chunks are passed to the language model as context. The model then generates a cited answer referencing the source document and page.

What you can use it for

Practically any situation where you need an AI that knows your specific content rather than generic world knowledge:

  • Internal documentation — onboarding wikis, runbooks, SOPs
  • Legal and compliance — policy documents, contracts, regulatory filings
  • Product manuals — let customers query your documentation in plain English
  • Research — upload papers and ask questions across them
  • Support knowledge bases — power a customer-facing chatbot with your own help center content

Step by step: create your first knowledge base

1. Sign up for free — no credit card required. You get immediate access to the knowledge base dashboard.

2. Create a knowledge base — give it a name and description. You can have multiple KBs for different projects.

3. Upload files — drag in PDFs or TXT files. Lexora processes them in the background. For a 50-page PDF, ingest typically completes in under two minutes.

4. Start querying — open the chat panel, attach your KB, and ask questions in plain English. Responses include citations so you know exactly which document and section each answer came from.

5. Use via API — once your KB is live, you can query it programmatically using your Lexora API key. The endpoint is OpenAI-compatible, so existing integrations need minimal changes.

Why BGE-M3 for embeddings?

BGE-M3 is a strong open-source embedding model from BAAI that supports 100+ languages and produces 1024-dimensional vectors. It runs on CPU workers in Lexora's distributed network, which means embedding costs nothing extra — the compute is absorbed into the free knowledge base tier.

In benchmark comparisons, BGE-M3 matches or beats OpenAI's text-embedding-3-small on most retrieval tasks, especially for multilingual content. You're not trading quality for cost here.

API access for developers

Every knowledge base gets an ID you can reference from your own code. A RAG-augmented request looks like this:

const response = await openai.chat.completions.create({
  model: "Qwen/Qwen3-8B",
  messages: [{ role: "user", content: "Summarize our refund policy" }],
  // pass your KB ID in the extra body
  // Lexora retrieves context automatically
});

Full API docs and knowledge base query parameters are in the Lexora docs.

The bottom line

Most RAG solutions either charge you for embedding, charge you for vector storage, or require you to wire together OpenAI embeddings + Pinecone + a retrieval layer yourself. Lexora collapses all of that into a single platform where the training pipeline is free and you only pay for the tokens your chat model generates.

If you've got documents and want an AI that actually knows them — not one that pretends to — a Lexora knowledge base is the fastest path there.

Ready to cut your inference costs?

Get started with Lexora — no idle GPU costs, pay only for what you generate.

Create Your Free Knowledge Base