Discover LlamaIndex: Custom Retrievers + Hybrid Search
Key Takeaways
This video tutorial demonstrates how to implement custom retrievers and hybrid search engines using LlamaIndex, a unique type of search system that combines vector and keyword table indices. The tutorial covers the installation of LlamaIndex, importing necessary libraries, and building custom indexes and retrievers.
Full Transcript
hello everyone welcome to another tutorial with llama index today we will explore a unique type of search system in lava index known as custom retrieval or hybrid search engine in our previous tutorials we primarily use vectors such based on embedding similarity however relies solely on its method may not always be correct so let's say you are looking for some information from an essay by Ball Ground regarding these activities afterwards time at Yale our different search methods would approach this time differently let's say if we employ a keyword search the system will search for exact matching expecting results that is however if programs say it does not directly reference real a keyword search might not return any relevant results living with an empty set and contracts um let's say a vector searching understands the context or meaning of your file it can provide your advantages even without a direct mention of deal it achieves this by utilizing embeddings to manager exact context of websites it's similar context in available data this way it may permission meaningful response regardless of whether the keyword ale is present in the text so how does our hybrid search handle this situation if we set it and it will search for results that match both the keyboard and vectors are expected them since there is no direct mention of real in the essay this convolution would not result any results so through this example system [Music] depending on circumstances you can select to use either both keyword and Vector sets or just one of them in this tutorial we'll guide you on how to implement this flexibility so you can get the most out of yourself system so let's get started with it let's start with the installing gamma index and then we even import login and set the logging things and then we got all the things related to our customer and I understand then simple keyword table next to build their indexes response insurance and service context and storage context for setting our different service or storage index as well and you can check my previous videos to understand all these different things uh positivities explain different indexes and storage context service context and or other key components [Music] [Music] so yeah we need this and we also need the data set for this program index products um it's a data folder of scheme that in data folder and Dot txt [Music] so yeah so that is a delivery and then we make the documents and set the default sample size you can read the boxer make notes accordingly so and create a vectors for index as well as a simple keyword tablet X let's create them um and then one is all this index separated and so uh to create the customer retriever or the hybrid search that involves both both the usage of the trendex and period index basically we will retrieve uh the nodes using the animating similarity as well as uh specific keywords from the Keyword Index answer so we need to create uh two reverse Financial territory one and keyword retrieval and then pass it to the class uh and then the mode is and or are so and um and means you return the nodes uh both from the internal Retriever and keyword retrieval uh using those two levels and then if it is and you just combine only common nodes uh if it is odd you combine notes on both of them based on the user that you would like to have earlier [Music] [Music] and initialize the default uh response synthesizer and create a retriever query engine so the query engine will be with custom Retriever and then you see the response inside that we have to Define and we even have a temporary interval you can also to compare further quality and you have a keyword code in there as well YC and so we gave an answer I would order done now let's do what the author did what this time until uh sincere has never mentioned uh about checking the essay so the response would be even and the retrieve nodes will also be zero for the same but if you do uh something uh with the letters research um if you have an answer but but again if you see uh the number of nodes are present in it it will still retrieve some nodes because of the embedding similarity but here uh the custom retriever we don't even retrieve all the names because uh combining both websites and keyboard sets so in that way we will be able to make it more accurate and also the cost because the amounts are zero the costs are taken for generating a RSM will also be low so this is how you can have a customer table and then work on work towards it with the interesting resources and you can even check the same in the top 2007 about the customer table and that's all for this video um I will read more interesting content in the next video thank you
Original Description
In this tutorial video on LlamaIndex, Ravi discusses the need for custom retrievers and building it using vector and keyword table indices.
OUTLINE:
00:00 - Introduction.
00:24 - Custom Retriever.
02:13 - Implementing Custom Retriever.
Watch on YouTube ↗
(saves to browser)
Sign in to unlock AI tutor explanation · ⚡30
Playlist
Uploads from LlamaIndex · LlamaIndex · 19 of 60
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
▶
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
LlamaIndex Virtual Meetup (May 4th, 2023)
LlamaIndex
LlamaIndex + MongoDB Workshop/Fireside Chat
LlamaIndex
Discover LlamaIndex: Ask Complex Queries over Multiple Documents
LlamaIndex
Discover LlamaIndex: Document Management
LlamaIndex
Discover LlamaIndex: Joint Text to SQL and Semantic Search
LlamaIndex
Discover LlamaIndex: JSON Query Engine
LlamaIndex
LlamaIndex Webinar: Active Retrieval Augmented Generation
LlamaIndex
LlamaIndex Webinar: Demonstrate-Search-Predict (DSP) with Omar Khattab
LlamaIndex
LlamaIndex Sessions: Practical challenges of building a Legal Chatbot over your PDFs
LlamaIndex
LlamaIndex Webinar: Graph Databases, Knowledge Graphs, and RAG with Wey (NebulaGraph)
LlamaIndex
LlamaIndex Webinar: Community Project Showcase (07/07/2023)
LlamaIndex
LlamaIndex Webinar: LLMs for Investment Research (with Didier Lopes, co-founder/CEO at OpenBB)
LlamaIndex
Discover LlamaIndex: Bottoms-Up Development With LLMs (Part 1, LLMs and Prompts)
LlamaIndex
Discover LlamaIndex: Bottoms-Up Development With LLMs (Part 2, Documents and Metadata)
LlamaIndex
Discover LlamaIndex: Key Components to build QA Systems
LlamaIndex
Discover LlamaIndex: Bottoms-Up Development with LLMs (Part 3, Evaluation)
LlamaIndex
LlamaIndex Webinar: From Prompt to Schema Engineering with Pydantic (with @jxnlco)
LlamaIndex
Discover LlamaIndex: Bottoms-Up Development with LLMs (Part 4, Embeddings)
LlamaIndex
Discover LlamaIndex: Custom Retrievers + Hybrid Search
LlamaIndex
LlamaIndex Webinar: Document Metadata and Local Models for Better, Faster Retrieval
LlamaIndex
LlamaIndex Webinar: Build Personalized AI Characters with RealChar
LlamaIndex
LlamaIndex Webinar: Make RAG Production-Ready
LlamaIndex
LlamaIndex Workshop: Building RAG with Knowledge Graphs
LlamaIndex
Discover LlamaIndex: Introduction to Data Agents for Developers
LlamaIndex
LlamaIndex Webinar: Finetuning + RAG
LlamaIndex
Discover LlamaIndex: SEC Insights, End-to-End Guide
LlamaIndex
Discover LlamaIndex: Custom Tools for Data Agents
LlamaIndex
LlamaIndex Sessions: Building a Lending Criteria Chatbot in Production
LlamaIndex
Discover LlamaIndex: Bottoms-Up Development with LLMs (Part 5, Retrievers + Node Postprocessors)
LlamaIndex
LlamaIndex Webinar: How to Win a LLM Hackathon
LlamaIndex
LlamaIndex Webinar: LLM Challenges in Production (w/ Mayo Oshin, AI Jason, Dylan from Starmorph)
LlamaIndex
LlamaIndex Webinar: Agents Showcase!
LlamaIndex
LlamaIndex Webinar: Learn about DSPy
LlamaIndex
LlamaIndex Webinar: Time-based retrieval for RAG (with Timescale)
LlamaIndex
LlamaIndex Webinar: Build/Break/Test LLM Apps Showcase (co-hosted with TrueEra, Pinecone)
LlamaIndex
LlamaIndex Workshop: Evaluation-Driven Development (EDD)
LlamaIndex
LlamaIndex Webinar: Building LLM Apps for Production, Part 1 (co-hosted with Anyscale)
LlamaIndex
LlamaIndex Webinar: Learn about Fine-tuning + RAG (w/ Victoria Lin, author of RA-DIT)
LlamaIndex
LlamaIndex Webinar: What's next for AI after OpenAI Dev Day?
LlamaIndex
Introducing create-llama
LlamaIndex
LlamaIndex Webinar: PrivateGPT - Production RAG with Local Models
LlamaIndex
Multi-modal Retrieval Augmented Generation with LlamaIndex
LlamaIndex
LlamaIndex Webinar: LLaVa Deep Dive
LlamaIndex
A deep dive into Retrieval-Augmented Generation with Llamaindex
LlamaIndex
LlamaIndex Workshop: Multimodal + Advanced RAG Workhop with Gemini
LlamaIndex
LlamaIndex Webinar: Efficient Parallel Function Calling Agents with LLMCompiler
LlamaIndex
Introduction to Query Pipelines (Building Advanced RAG, Part 1)
LlamaIndex
LLMs for Advanced Question-Answering over Tabular/CSV/SQL Data (Building Advanced RAG, Part 2)
LlamaIndex
LlamaIndex Webinar: Advanced Tabular Data Understanding with LLMs
LlamaIndex
Ollama X LlamaIndex Multi-Modal
LlamaIndex
Build Agents from Scratch (Building Advanced RAG, Part 3)
LlamaIndex
LlamaIndex Webinar: Build No-Code RAG with Flowise
LlamaIndex
LlamaIndex Sessions: Practical Tips and Tricks for Productionizing RAG (feat. Sisil @ Jasper)
LlamaIndex
Introduction to LlamaIndex v0.10
LlamaIndex
Build SELF-DISCOVER from Scratch with LlamaIndex
LlamaIndex
Introducing LlamaCloud (and LlamaParse)
LlamaIndex
LlamaIndex Sessions: 12 RAG Pain Points and Solutions
LlamaIndex
LlamaIndex Webinar: RAG Beyond Basic Chatbots
LlamaIndex
A Comprehensive Cookbook for Claude 3
LlamaIndex
LlamaIndex Webinar: RAPTOR - Tree-Structured Indexing and Retrieval
LlamaIndex
More on: LLM Foundations
View skill →Related AI Lessons
⚡
⚡
⚡
⚡
Claude AI vs ChatGPT: Which One Is Actually Better in 2026?
Medium · AI
Claude AI vs ChatGPT: Which One Is Actually Better in 2026?
Medium · Programming
IntelliBooks: Classic RAG vs Graph RAG vs Agentic RAG – Choosing the Right AI Retrieval Architecture for Enterprise AI
Dev.to AI
Fluid, natural voice translation with Gemini 3.5 Live Translate
Dev.to AI
Chapters (3)
Introduction.
0:24
Custom Retriever.
2:13
Implementing Custom Retriever.
🎓
Tutor Explanation
DeepCamp AI