Retrieval-Augmented Generation (RAG)

Learn about Retrieval-Augmented Generation (RAG), a practical approach to enhance AI applications with external knowledge bases. Explore how RAG helps create more accurate AI systems by combining language models with real-world data. Find practical guides, implementation examples, and best practices for building RAG systems. Ideal for developers and teams working on AI applications who want to improve their models' accuracy and reliability

More Articles

RAGFlow 1.0 Tutorial: Setup, PDF Parsing and Real Test Results

RAGFlow 1.0 Tutorial: Setup, PDF Parsing and Real Test Results

RAGFlow 1.0 installed with Docker and tested on a 147-page PDF: setup, OpenAI models, DeepDoc vs. a vision LLM parser, RAM usage and answer accuracy.

2025-06-20
15 min read
Read Post
Azure AI Search RAG Tutorial: Build RAG on Azure with Python

Azure AI Search RAG Tutorial: Build RAG on Azure with Python

RAG on Azure, tested: index a 144-page PDF with Azure AI Search, run hybrid search with semantic ranker and answer with citations in Python. With costs.

2024-12-13
16 min read
Read Post
Crawl4AI Docker Tutorial: Crawl Websites for LLMs via REST API

Crawl4AI Docker Tutorial: Crawl Websites for LLMs via REST API

Build and run Crawl4AI in Docker, crawl pages via its REST API to get markdown, metadata and links, and extract data with an LLM through LiteLLM.

2024-11-23
7 min read
Read Post
Late Chunking: Improving RAG Performance with Context-Aware Embeddings

Late Chunking: Improving RAG Performance with Context-Aware Embeddings

Late chunking embeds the whole document first, then pools token embeddings into chunks. Python code with jina-embeddings-v3 and a similarity comparison.

2024-11-15
7 min read
Read Post
What is LibreChat? Features, setup and Open WebUI comparison

What is LibreChat? Features, setup and Open WebUI comparison

LibreChat is an open-source, self-hosted ChatGPT alternative. We installed v0.8.8 with Docker and tested agents, MCP, file search, artifacts and web search.

2024-10-08
13 min read
Read Post
How to crawl websites for LLMs - using Firecrawl

How to crawl websites for LLMs - using Firecrawl

Firecrawl turns websites into LLM-ready markdown. Python examples for scraping, crawling, Pydantic-based extraction, LangChain and self-hosting with Docker.

2024-09-08
5 min read
Read Post
RAG, Embeddings and Vector Search with Google BigQuery

RAG, Embeddings and Vector Search with Google BigQuery

Store embeddings in BigQuery, create them with ML.GENERATE_EMBEDDING, query them with VECTOR_SEARCH and run a full RAG pipeline with Gemini in one SQL query.

2024-08-16
12 min read
Read Post
Document Extraction with GPT-4o: Parse PDF, Word and Excel Files

Document Extraction with GPT-4o: Parse PDF, Word and Excel Files

Parse PDF, Word and Excel files with GPT-4o vision: render each page as an image, extract the text in Python, for about 0.32 to 0.62 cents per page.

2024-08-15
9 min read
Read Post
How to classify, describe and analyze images using GPT-4o vision

How to classify, describe and analyze images using GPT-4o vision

Python examples for sending images to GPT-4o via the OpenAI API to classify, describe and analyze them, plus detail modes and per-image costs.

2024-08-09
8 min read
Read Post
Open WebUI: What It Is, How to Install It and What It Costs

Open WebUI: What It Is, How to Install It and What It Costs

Open WebUI is a free, self-hosted ChatGPT-style interface. We installed v0.13.0, tested RAG, MCP and web search, and explain the license and pricing.

2024-08-08
15 min read
Read Post
What is the VertexAI model garden - a practical example: Deploying Llama 3.1 and Claude 3.5 Sonnet

What is the VertexAI model garden - a practical example: Deploying Llama 3.1 and Claude 3.5 Sonnet

What Vertex AI Model Garden is and how to use it: Claude 3.5 Sonnet and Llama 3.1 as pay-per-use API services, CLIP on a VM, and Hugging Face models.

2024-08-03
10 min read
Read Post
Fine-tune OpenAI's GPT-4o mini LLM AI model

Fine-tune OpenAI's GPT-4o mini LLM AI model

Fine-tune GPT-4o mini in the OpenAI dashboard: the JSONL training format, how many examples you need, job settings, costs and calling the model from Python.

2024-07-25
8 min read
Read Post
Neo4j LLM Knowledge Graph Builder: How to Create Knowledge Graphs for RAG

Neo4j LLM Knowledge Graph Builder: How to Create Knowledge Graphs for RAG

Set up the Neo4j LLM Knowledge Graph Builder on AuraDB or Docker, turn a web page into a knowledge graph and query it with GraphRAG in the built-in chat.

2024-07-19
10 min read
Read Post
BigQuery Text-to-SQL: Query Your Database in Natural Language

BigQuery Text-to-SQL: Query Your Database in Natural Language

Build a text-to-SQL agent for BigQuery in Python: GPT-4o writes the SQL, errors are fed back for self-correction, and RAG picks relevant columns.

2024-07-12
11 min read
Read Post
LLM Document Extraction: Pull Structured Data from Complex PDFs

LLM Document Extraction: Pull Structured Data from Complex PDFs

Extract text and tables from complex PDFs with an open-source vision LLM: render each page as an image and prompt MiniCPM-Llama3-V 2.5. Python code included.

2024-06-23
8 min read
Read Post
How to use AI to create a PowerPoint presentation?

How to use AI to create a PowerPoint presentation?

Let GPT-4 write python-pptx code that builds a PowerPoint deck from your company documents via RAG, using your own corporate template.

2024-05-15
7 min read
Read Post
Vertex AI Agent Builder: What It Is, with a Slack Search Example

Vertex AI Agent Builder: What It Is, with a Slack Search Example

What Vertex AI Agent Builder is and what Google calls it today, with a no-code example: index Slack messages and build a Gemini search app.

2024-05-04
10 min read
Read Post
Chat with your Confluence: A Step-by-Step Guide using Airbyte, Langchain and PGVector

Chat with your Confluence: A Step-by-Step Guide using Airbyte, Langchain and PGVector

Build a Confluence chatbot in Python: load pages with PyAirbyte and LangChain's AirbyteLoader, store embeddings in PGVector, answer with GPT-4 Turbo.

2024-04-30
8 min read
Read Post
Advanced RAG: Improving Retrieval-Augmented Generation with Hypothetical Document Embeddings (HyDE)

Advanced RAG: Improving Retrieval-Augmented Generation with Hypothetical Document Embeddings (HyDE)

HyDE has an LLM write a fake answer document and searches with its embedding instead of the query's. How it works, plus a LlamaIndex example.

2024-04-19
6 min read
Read Post
How to boost your database performance with OpenAIs new v3 embeddings

How to boost your database performance with OpenAIs new v3 embeddings

OpenAI's v3 embeddings can be shortened thanks to Matryoshka training. Adaptive retrieval uses that for faster vector search: 580 QPS at 99% accuracy.

2024-03-12
10 min read
Read Post
Introduction to Retrieval Augmented Generators (RAG): Enhancing Virtual Assistants with Domain-Specific Knowledge

Introduction to Retrieval Augmented Generators (RAG): Enhancing Virtual Assistants with Domain-Specific Knowledge

How RAG works step by step: ingestion, chunking, embeddings, vector search and the LLM answer, and why it is easier to update than a fine-tuned model.

2024-03-11
5 min read
Read Post
Advanced RAG: Increase RAG Quality with ColBERT Reranker and llamaindex

Advanced RAG: Increase RAG Quality with ColBERT Reranker and llamaindex

Add a ColBERT reranker to a LlamaIndex RAG pipeline: why semantic search ranks the wrong chunks first, and the Python code to rerank them before the LLM call.

2024-03-01
6 min read
Read Post
Advanced RAG: Recursive Retrieval with llamaindex

Advanced RAG: Recursive Retrieval with llamaindex

Recursive retrieval in LlamaIndex links PDF tables to pandas query engines, so RAG can answer questions from table data. Step-by-step Python example.

2024-02-25
8 min read
Read Post
vLLM with HTTPS: Self-Host an LLM Behind a Caddy Reverse Proxy

vLLM with HTTPS: Self-Host an LLM Behind a Caddy Reverse Proxy

Serve an open-source LLM with vLLM's OpenAI-compatible Docker image and put Caddy in front as a reverse proxy for automatic HTTPS with Let's Encrypt.

2024-02-15
7 min read
Read Post
RAG Evaluation with Ragas: How to Measure RAG Pipeline Quality

RAG Evaluation with Ragas: How to Measure RAG Pipeline Quality

Evaluate a RAG pipeline with Ragas: generate a test set from your documents, then score faithfulness, answer relevancy, context recall and context precision.

2024-02-08
8 min read
Read Post
Integrating enterprise knowledge with LLMs

Integrating enterprise knowledge with LLMs

Fine-tuning, training your own model or RAG: how each way of adding company knowledge to an LLM works, its pros and cons, and why RAG usually wins.

2024-01-23
9 min read
Read Post