Video wird geladen...

Video konnte nicht geladen werden

Zur Startseite

RAG, semantic search & vector databases — finally explained simple RAG. Semantic search. Vector databases. You've heard these words a hundred times and nodded like you got them. Truth is, they're not four things to memorize — they're pieces of one machine. Here's the whole thing, simple: The problem...

11,600 Aufrufe • vor 3 Monaten •via TikTok

0 Kommentare

Keine Kommentare verfügbar

Kommentare vom Original-Post werden hier angezeigt

Ähnliche Videos

Researchers built a new RAG approach that: - does not need a vector DB. - does not embed data. - involves no chunking. - performs no similarity search. And it hit 98.7% accuracy on a financial benchmark (SOTA). Here's the core problem with RAG that this new approach solves: Traditional RAG chunks documents, embeds them into vectors, and retrieves based on semantic similarity. But similarity ≠ relevance. When you ask "What were the debt trends in 2023?", a vector search returns chunks that look similar. But the actual answer might be buried in some Appendix, referenced on some page, in a section that shares zero semantic overlap with your query. Traditional RAG would likely never find it. PageIndex (open-source) solves this. Instead of chunking and embedding, PageIndex builds a hierarchical tree structure from your documents, like an intelligent table of contents. Then it uses reasoning to traverse that tree. For instance, the model doesn't ask: "What text looks similar to this query?" Instead, it asks: "Based on this document's structure, where would a human expert look for this answer?" That's a fundamentally different approach with: - No arbitrary chunking that breaks context. - No vector DB infrastructure to maintain. - Traceable retrieval to see exactly why it chose a specific section. - The ability to see in-document references ("see Table 5.3") the way a human would. But here's the deeper issue that it solves. Vector search treats every query as independent. But documents have structure and logic, like sections that reference other sections and context that builds across pages. PageIndex respects that structure instead of flattening it into embeddings. Do note that this approach may not make sense in every use case since traditional vector search is still fast, simple, and works well for many applications. But for professional documents that require domain expertise and multi-step reasoning, this tree-based, reasoning-first approach shines. For instance, PageIndex achieved 98.7% accuracy on FinanceBench, significantly outperforming traditional vector-based RAG systems on complex financial document analysis. Everything is fully open-source, so you can see the full implementation in GitHub and try it yourself. I have shared the GitHub repo in the replies!

Avi Chawla

974,521 Aufrufe • vor 9 Monaten

Traditional data pipelines don't work for RAG applications. There are 3 issues with them: ​ 1. Traditional data engineering solutions are optimized to handle structured data. RAG applications rely primarily on unstructured data. ​ 2. The connector ecosystem to load data from unstructured data sources is very immature. ​ 3. Traditional solutions do not offer any way to transform unstructured data into an optimized vector search index. ​ The goal of a RAG Pipeline is to solve these problems. ​ The number one objective is to create a reliable vector search index using factual knowledge and relevant context. This sounds easy, but it's one of the biggest challenges we face when building RAG applications. ​ At a high level, there are four different stages in the architecture of a RAG pipeline: ​ 1. Ingestion: Here is where the pipeline loads the information from the data source. ​ 2. Extraction: Where the pipeline processes the input data and decides how to retrieve the text contained inside them. ​ 3. Transform: Where the pipeline chunks the data and generates document embeddings. ​ 4. Load: Where the pipeline creates a search index in a vector database and loads the document embeddings. ​ There are different rabbit holes at each one of these stages. Here are three of them: ​ 1. Ingesting data once is simple. The hard part is refreshing the vector database whenever the original data source changes. ​ 2. Extracting the content of a plain text document is simple. The hard part is to extract content from complex documents containing tables, images, or cross-references. ​ 3. A simple continual chunking strategy with an overlap is simple. The hard part is to find the optimal strategy for your specific knowledge base and the way you are planning to query it. ​ In the attached video, I'll show you how you can build an enterprise-grade RAG Pipeline that solves every one of the above problems. ​ I'll use Vectorize. They partnered with me on this post. You can use them to build RAG pipelines optimized for accurate context retrieval. ​ ​ If you have a few documents lying around, set up a free account and give it a try.

Santiago

40,646 Aufrufe • vor 2 Jahren

RAG vs the second brain — which memory system your AI needs. Two ways to give an AI your knowledge — and the difference decides whether your AI actually knows your business. Way one is RAG. Your documents get chopped into fragments and filed into a searchable pile. Every question triggers a search, and the AI answers from whatever snippets came back — like a librarian sprinting through a warehouse of millions of pages and returning with a few photocopies. Unbeatable for giant archives. And the honest limit: the AI only ever sees the snippets the search happened to fetch. Way two is the second brain — and here's the part people get wrong: you never write it yourself. You hand the AI the whole messy pile, and IT organizes everything into a knowledge base built for AI to read: clean pages, one topic per page, linked, with an index. The AI opens whole pages and follows the links, the way a new employee reads the company handbook. It genuinely knows the material, you can open any page and see exactly what it believes — and when you fix a page, every answer after that is built on the fix. The AI does the librarian work. RAG searches your pile. A second brain reads your book. The decision: a mountain of documents nobody could curate → RAG the archive. The operating knowledge your business runs on → write the book. Serious setups run both — the wiki carries the core, RAG carries the deep archive. #aiemployee #rag #secondbrain

Professor Glitch

17,600 Aufrufe • vor 2 Monaten

Announcing a new Coursera course: Retrieval Augmented Generation (RAG) You'll learn to build high performance, production-ready RAG systems in this hands-on, in-depth course created by and taught by , experienced AI and ML engineer, researcher, and educator. RAG is a critical component today of many LLM-based applications in customer support, internal company Q&A systems, even many of the leading chatbots that use web search to answer your questions. This course teaches you in-depth how to make RAG work well. LLMs can produce generic or outdated responses, especially when asked specialized questions not covered in its training data. RAG is the most widely used technique for addressing this. It brings in data from new data sources, such as internal documents or recent news, to give the LLM the relevant context to private, recent, or specialized information. This lets it generate more grounded and accurate responses. In this course, you’ll learn to design and implement every part of a RAG system, from retrievers to vector databases to generation to evals. You’ll learn about the fundamental principles behind RAG and how to optimize it at both the component and whole-system levels. As AI evolves, RAG is evolving too. New models can handle longer context windows, reason more effectively, and can be parts of complex agentic workflows. One exciting growth area is Agentic RAG, in which an AI agent at runtime (rather than it being hardcoded at development time) autonomously decides what data to retrieve, and when/how to go deeper. Even with this evolution, access to high-quality data at runtime is essential, which is why RAG is a key part of so many applications. You'll learn via hands-on experiences to: - Build a RAG system with retrieval and prompt augmentation - Compare retrieval methods like BM25, semantic search, and Reciprocal Rank Fusion - Chunk, index, and retrieve documents using a Weaviate vector database and a news dataset - Develop a chatbot, using open-source LLMs hosted by Together AI, for a fictional store that answers product and FAQ questions - Use evals to drive improving reliability, and incorporate multi-modal data RAG is an important foundational technique. Become good at it through this course! Please sign up here:

Andrew Ng

124,981 Aufrufe • vor 1 Jahr

How to build a private RAG on your Mac (Ollama + AnythingLLM, step by step, free models) How to build a private RAG on your Mac: an AI that answers from your own business files, shows you where it found each answer, and keeps every file on your Mac. Two free apps (Ollama and AnythingLLM Desktop), free open models, no Docker, no cloud account. By the end you'll know what every piece of a RAG system does, so when it gets something wrong you know exactly where to look. RAG in plain words: filling the shelf, then asking. A reader pulls the text out of your files, a chopper cuts it into small passages, an embedding model turns each passage into numbers that capture its meaning, and they all sit on a shelf called a vector database, on your disk. When you ask, your question gets turned into numbers by the same embedding model, the shelf hands back the closest passages, a second reader (a reranker) keeps the best few, and the chat model answers only from those and names the file. The build: 1. Check your Mac. Apple menu, About This Mac. You want an Apple M-series chip and at least 16 GB of memory. 8 GB is too tight. Install Ollama from ollama.com. 2. In Ollama's settings, switch Cloud off, so nothing you ask goes to Ollama's servers, and leave "Expose Ollama to the network" off. 3. Download your private models in Terminal. Pick by memory: 16 or 24 GB, ollama pull qwen3.5:9b (about 7 GB). 32 GB, gemma4:26b. 64 GB or more, qwen3.6:35b. Then the embedding model, ollama pull qwen3-embedding:0.6b. All Apache 2.0, free for business use. Run ollama run qwen3.5:9b --verbose to see your real eval rate. 4. Install AnythingLLM Desktop (Apple Silicon). Keep Ollama running, choose Ollama and your chat model, choose Just me, skip the survey. 5. Before you upload a single file: Embedder = Ollama with qwen3-embedding:0.6b (change it later and every document has to be embedded again), Vector Database = LanceDB, Text chunk size 1,500 with 150 overlap, and anonymous telemetry off. 6. Create a workspace, upload your files, Save and Embed. Scanned PDFs are read with OCR right on your Mac, but only when the whole PDF is pictures. 7. The rules: Chat mode Query, your own refusal message, a system prompt that says answer only from the context, name the file, copy prices exactly, never guess. Reasoning Effort Off for speed. Search Preference Accuracy Optimized, Max Context Snippets 6. The three traps: part codes like H-40 and H-50 look almost the same to a meaning search (pin small price lists), totals are a spreadsheet's job, and old versions keep answering until you remove them. 8. Prove it works with 10 questions you already know the answers to. 8 out of 10 right, and the one that isn't in your files has to refuse. Click Sources under every answer to see if the reader, the chopper, the search or the model broke. Last step: ask once online (it downloads the reranker the first time), then turn the Wi-Fi off and ask again. It still answers. And check FileVault is on. This is for small business owners, consultants, trades, agencies and anyone who wants AI on their own documents without uploading them. #aiautomation #aiagents #aiemployee #localai #privateai

Professor Glitch

46,000 Aufrufe • vor 1 Monat

How to build a company second brain that never makes things up (RAG, every step) A company AI that answers from 18,000 documents, shows the exact page, pulls up the right diagram, and says so when it can't prove something. Here's how it's built, step by step. The idea (RAG): the AI looks things up before it answers. Search by meaning works like a map: every chunk of every document is a pin, and similar meanings sit on the same street. Part numbers need exact-word search, so you run both. The loader (a program that gets documents onto the map), built with Claude Code: Read the documents properly. Docling (free) keeps tables whole and cuts out every figure. Claude describes each diagram and reads its part numbers. Dry run on 50 documents first. Label every chunk (metadata). Which document, which version, current or replaced, which model, which plant, who can open it. The AI can only pick from approved lists, and anything that doesn't match goes to a human. Access is enforced in code before the search runs. Chunk by headings. About 500 tokens per chunk, a little overlap, tables and procedures kept whole, the heading path stamped on every chunk, plus one line of context. Fill the index in Pinecone. "Search by both meaning and exact words." Keep it current (n8n): every 15 minutes, ask SharePoint what changed. New versions go in first, old versions come out second. Answering (the courtroom): security at the door, a clerk that asks when something's missing, an evidence room (both searches plus a reranker), a first ruling (not enough evidence means "not in approved documents" and a ticket to the owner), a lawyer that cites every sentence, and a judge that checks every claim and number. Prove it before launch: 300 real questions per department, including ones it must refuse. Leaks must be zero. #aiautomation #microsoftcopilot #claudecode #aiemployee #aiagents

Professor Glitch

78,000 Aufrufe • vor 1 Monat