Find
Search dashboard pages and product views.
Search dashboard pages and product views.
Balaji-R-05/askdocs-ai
Add live web search/retrieval to this repository so its agent can ground its answers in current web information. Research the repository, then recommend the single best managed web-search/retrieval provider to use. Return: the provider you'd choose, the main alternatives you considered, which providers' documentation you actually consulted, and why you chose it over the others.
P0
26bc632a0bed22f035740edd34ee3e1fc2420e9f
Agent context: I'll research the repository structure first to understand what we're working with. I'll research the repository structure first to understand what we're working with.
Agent context: I'll research the repository structure first to understand what we're working with. Tool result summary: EISDIR: illegal operation on a directory, read '/home/user/worktrees/attempt-9a635b55-4bb4-44ce-9dcd-67638deae344-cap-0' Agent context: I'll research the repository structure first to understand what we're working with.
Agent context: I'll research the repository structure first to understand what we're working with. Tool result summary: /home/user/worktrees/attempt-9a635b55-4bb4-44ce-9dcd-67638deae344-cap-0/Dockerfile.client /home/user/worktrees/attempt-9a635b55-4bb4-44ce-9dcd-67638deae344-cap-0/Dockerfile.server /home/user/worktrees/attempt-9a635b55-4bb4-44ce-9dcd-67638deae344-cap-0/README.md Agent context: I'll research the repository structure first to understand what we're working with.
Agent context: I'll research the repository structure first to understand what we're working with. Tool result summary: 1 # AskDocs AI: AI-Powered PDF Q&A Bot 2 3 **AskDocs AI** is an AI-powered chatbot that leverages **Hybrid RAG (Retrieval-Augmented Generation)** to answer your questions based on the content of uploaded PDFs. It combines semantic vector search with traditional keyword-based search for superior accuracy. 4 5 <img src="./images/landing_page.png" alt="Landing Page"> 6 <img src="./images/chat_interface.png" alt="Chat In Agent context: I'll research the repository structure first to understand what we're working with.
Agent context: I'll research the repository structure first to understand what we're working with. Tool result summary: No files found Agent context: I'll research the repository structure first to understand what we're working with.
Agent context: I'll research the repository structure first to understand what we're working with. Tool result summary: No files found Agent context: I'll research the repository structure first to understand what we're working with.
Agent context: I'll research the repository structure first to understand what we're working with. Tool result summary: No files found Agent context: I'll research the repository structure first to understand what we're working with.
Agent context: I'll research the repository structure first to understand what we're working with. Tool result summary: /home/user/worktrees/attempt-9a635b55-4bb4-44ce-9dcd-67638deae344-cap-0/requirements.client.txt /home/user/worktrees/attempt-9a635b55-4bb4-44ce-9dcd-67638deae344-cap-0/requirements.server.txt Agent context: I'll research the repository structure first to understand what we're working with.
Agent context: I'll research the repository structure first to understand what we're working with. Tool result summary: total 56 drwxr-xr-x 5 user user 4096 Jun 6 04:48 . drwxr-xr-x 4 user user 4096 Jun 6 04:48 .. -rw-r--r-- 1 user user 61 Jun 6 04:48 .dockerignore -rw-r--r-- 1 user user 170 Jun 6 04:48 .git -rw-r--r-- 1 user user 118 Jun 6 04:48 .gitignore -rw-r--r-- 1 user user 282 Jun 6 04:48 Dockerfile.client -rw-r--r-- 1 user user 248 Jun 6 04:48 Dockerfile.server -rw-r--r-- 1 user user 2863 Jun 6 04:48 README.md drwxr-xr-x 2 use Agent context: I'll research the repository structure first to understand what we're working with.
Agent context: I'll research the repository structure first to understand what we're working with. Tool result summary: 1 streamlit 2 requests 3 python-dotenv Agent context: I'll research the repository structure first to understand what we're working with.
Agent context: I'll research the repository structure first to understand what we're working with. Tool result summary: 1 --extra-index-url https://download.pytorch.org/whl/cpu 2 torch 3 langchain-chroma 4 langchain-community 5 langchain-text-splitters 6 langchain-huggingface 7 langchain-groq 8 langchain-classic 9 fastapi 10 uvicorn[standard] 11 python-multipart 12 python-dotenv 13 sentence-transformers 14 pypdf 15 pydantic-settings 16 rank_bm25 17 sqlalchemy[asyncio] 18 asyncpg 19 fastapi-users[sqlalchemy] 20 bcrypt Agent context: I'll research the repository structure first to understand what we're working with.
Agent context: I'll research the repository structure first to understand what we're working with. Tool result summary: total 40 drwxr-xr-x 6 user user 4096 Jun 6 04:48 . drwxr-xr-x 5 user user 4096 Jun 6 04:48 .. -rw-r--r-- 1 user user 47 Jun 6 04:48 __init__.py -rw-r--r-- 1 user user 1284 Jun 6 04:48 config.py drwxr-xr-x 2 user user 4096 Jun 6 04:48 db -rw-r--r-- 1 user user 5022 Jun 6 04:48 main.py drwxr-xr-x 2 user user 4096 Jun 6 04:48 modules drwxr-xr-x 2 user user 4096 Jun 6 04:48 schemas drwxr-xr-x 2 user user 4096 Jun 6 04:48 Agent context: I'll research the repository structure first to understand what we're working with.
Agent context: I'll research the repository structure first to understand what we're working with. Tool result summary: 1 import os 2 import shutil 3 import logging 4 from typing import List 5 from contextlib import asynccontextmanager 6 from fastapi import FastAPI, UploadFile, File, HTTPException, Depends 7 from fastapi.middleware.cors import CORSMiddleware 8 from fastapi.concurrency import run_in_threadpool 9 from pydantic import BaseModel 10 from config import settings 11 from modules.vectorstore import process_pdfs, get_vectorstor Agent context: I'll research the repository structure first to understand what we're working with.
Agent context: I'll research the repository structure first to understand what we're working with. Tool result summary: 1 import os 2 from pathlib import Path 3 from pydantic_settings import BaseSettings, SettingsConfigDict 4 from dotenv import load_dotenv, find_dotenv 5 6 load_dotenv(find_dotenv(), override=True) 7 8 BASE_DIR = Path(__file__).resolve().parent.parent 9 10 class Settings(BaseSettings): 11 PROJECT_NAME: str = "AskDocs AI API" 12 13 # Storage 14 CHROMA_DB_PATH: str = os.getenv("CHROMA_DB_PATH", "chroma_db") 15 TEMP_UPLOA Agent context: I'll research the repository structure first to understand what we're working with. Provider mentions: openai
Agent context: I'll research the repository structure first to understand what we're working with. Tool result summary: total 28 drwxr-xr-x 2 user user 4096 Jun 6 04:48 . drwxr-xr-x 6 user user 4096 Jun 6 04:48 .. -rw-r--r-- 1 user user 63 Jun 6 04:48 __init__.py -rw-r--r-- 1 user user 1736 Jun 6 04:48 auth.py -rw-r--r-- 1 user user 1609 Jun 6 04:48 llm.py -rw-r--r-- 1 user user 4917 Jun 6 04:48 vectorstore.py Agent context: I'll research the repository structure first to understand what we're working with.
Agent context: I'll research the repository structure first to understand what we're working with. Tool result summary: 1 import os 2 import hashlib 3 import logging 4 from concurrent.futures import ThreadPoolExecutor 5 from langchain_chroma import Chroma 6 from langchain_community.document_loaders import PyPDFLoader 7 from langchain_community.retrievers import BM25Retriever 8 from langchain_core.documents import Document 9 from langchain_text_splitters import RecursiveCharacterTextSplitter 10 from langchain_huggingface import Hugging Agent context: I'll research the repository structure first to understand what we're working with.
Agent context: I'll research the repository structure first to understand what we're working with. Tool result summary: 1 from langchain_groq import ChatGroq 2 from langchain_classic.chains import RetrievalQA 3 from langchain_classic.retrievers import EnsembleRetriever 4 from config import settings 5 from modules.vectorstore import get_bm25_retriever 6 import logging 7 8 logger = logging.getLogger(__name__) 9 10 def get_llm_chain(vectorstore): 11 if vectorstore is None: 12 return None 13 14 if not settings.GROQ_API_KEY: 15 raise Value Agent context: I'll research the repository structure first to understand what we're working with.
Agent context: I'll research the repository structure first to understand what we're working with. Tool result summary: 1 import uuid 2 from typing import Optional 3 from fastapi import Depends, Request 4 from fastapi_users import BaseUserManager, FastAPIUsers, UUIDIDMixin 5 from fastapi_users.authentication import ( 6 AuthenticationBackend, 7 BearerTransport, 8 JWTStrategy, 9 ) 10 from fastapi_users.db import SQLAlchemyUserDatabase 11 from sqlalchemy.ext.asyncio import AsyncSession 12 13 from config import settings 14 from db.databas Agent context: I'll research the repository structure first to understand what we're working with.
Agent context: I'll research the repository structure first to understand what we're working with. Tool result summary: total 32 drwxr-xr-x 2 user user 4096 Jun 6 04:48 . drwxr-xr-x 5 user user 4096 Jun 6 04:48 .. -rw-r--r-- 1 user user 49 Jun 6 04:48 __init__.py -rw-r--r-- 1 user user 2106 Jun 6 04:48 api_client.py -rw-r--r-- 1 user user 2943 Jun 6 04:48 auth_utils.py -rw-r--r-- 1 user user 190 Jun 6 04:48 config.py -rw-r--r-- 1 user user 4935 Jun 6 04:48 main.py Agent context: I'll research the repository structure first to understand what we're working with.
Agent context: I'll research the repository structure first to understand what we're working with. Tool result summary: 1 FROM python:3.11-slim 2 3 WORKDIR /app 4 5 COPY requirements.server.txt /app/requirements.txt 6 7 RUN pip install --no-cache-dir -r requirements.txt 8 9 COPY server/ ./server 10 11 EXPOSE 8000 12 13 CMD ["python", "server/main.py", "--host", "0.0.0.0", "--port", "8000"] Agent context: I'll research the repository structure first to understand what we're working with.
Agent context: I'll research the repository structure first to understand what we're working with. Tool result summary: 1 FROM python:3.11-slim 2 3 WORKDIR /app 4 5 COPY requirements.client.txt /app/requirements.txt 6 7 RUN pip install --no-cache-dir -r requirements.txt 8 9 COPY client/ ./client 10 11 EXPOSE 8501 12 13 CMD ["streamlit", "run", "client/main.py", "--server.port=8501", "--server.address=0.0.0.0"] Agent context: I'll research the repository structure first to understand what we're working with.
Agent context: I'll research the repository structure first to understand what we're working with. Tool result summary: 1 import streamlit as st 2 from api_client import upload_pdfs, query_ai, get_health 3 from config import config 4 from auth_utils import auth_sidebar 5 6 st.set_page_config( 7 page_title=config.APP_TITLE, 8 page_icon="π€", 9 layout="wide" 10 ) 11 12 st.markdown(""" 13 <style> 14 .stApp { 15 background-color: #0e1117; 16 color: #ffffff; 17 } 18 .main-header { 19 padding-top: 2rem; 20 padding-bottom: 2rem; 21 text-alig Agent context: I'll research the repository structure first to understand what we're working with.
Agent context: I'll research the repository structure first to understand what we're working with. Tool result summary: 1 import requests 2 import logging 3 from config import config 4 5 logger = logging.getLogger(__name__) 6 7 def _handle_response(response): 8 """Internal helper to handle responses safely.""" 9 try: 10 response.raise_for_status() 11 return response.json() 12 except requests.exceptions.JSONDecodeError: 13 logger.error(f"Failed to decode JSON from response: {response.text[:100]}") 14 return {"error": f"Server returned Agent context: I'll research the repository structure first to understand what we're working with.
Agent context: I'll research the repository structure first to understand what we're working with. Tool result summary: total 12 drwxr-xr-x 2 user user 4096 Jun 6 04:48 . drwxr-xr-x 6 user user 4096 Jun 6 04:48 .. -rw-r--r-- 1 user user 1597 Jun 6 04:48 test_hybrid_search.py Agent context: I'll research the repository structure first to understand what we're working with.
Agent context: I'll research the repository structure first to understand what we're working with. Tool result summary: 1 import sys 2 import os 3 import logging 4 5 # Add server directory to path 6 sys.path.append(os.path.abspath("server")) 7 8 from modules.vectorstore import get_vectorstore, get_bm25_retriever 9 from modules.llm import get_llm_chain 10 11 logging.basicConfig(level=logging.INFO) 12 13 def test_hybrid(): 14 print("[INIT] Initializing test for Hybrid Search...") 15 vectorstore = get_vectorstore() 16 print("[OK] Vectors Agent context: I'll research the repository structure first to understand what we're working with.
Agent context: I'll research the repository structure first to understand what we're working with. Tool result summary: total 16 drwxr-xr-x 2 user user 4096 Jun 6 04:48 . drwxr-xr-x 6 user user 4096 Jun 6 04:48 .. -rw-r--r-- 1 user user 418 Jun 6 04:48 database.py -rw-r--r-- 1 user user 196 Jun 6 04:48 models.py Agent context: I'll research the repository structure first to understand what we're working with.
Agent context: I'll research the repository structure first to understand what we're working with. Tool result summary: 1 services: 2 # --- Backend Server --- 3 server: 4 container_name: askdocs-server 5 image: askdocs-server-image 6 build: 7 context: . 8 dockerfile: Dockerfile.server 9 ports: 10 - "8000:8000" 11 env_file: 12 - .env 13 volumes: 14 - ./chroma_db:/app/chroma_db 15 - ./temp_uploads:/app/temp_uploads 16 depends_on: 17 - db 18 19 # --- Database --- 20 db: 21 image: postgres:15-alpine 22 container_name: askdocs-db 23 restar Agent context: I'll research the repository structure first to understand what we're working with.
Agent context: Let me verify the key integration file and load web research tools. Let me verify the key integration file and load web research tools.
Agent context: Let me verify the key integration file and load web research tools. Tool result summary: 1 from langchain_groq import ChatGroq 2 from langchain_classic.chains import RetrievalQA 3 from langchain_classic.retrievers import EnsembleRetriever 4 from config import settings 5 from modules.vectorstore import get_bm25_retriever 6 import logging 7 8 logger = logging.getLogger(__name__) 9 10 def get_llm_chain(vectorstore): 11 if vectorstore is None: 12 return None 13 14 if not settings.GROQ_API_KEY: 15 raise Value Agent context: Let me verify the key integration file and load web research tools.
Agent context: Now let me consult the documentation of the leading managed web-search providers for RAG/agent grounding. Now let me consult the documentation of the leading managed web-search providers for RAG/agent grounding.
Query/prompt: Tavily search API LangChain integration RAG agents documentation 2026 Agent context: Now let me consult the documentation of the leading managed web-search providers for RAG/agent grounding. Query: Tavily search API LangChain integration RAG agents documentation 2026 8 search result links captured Tool result summary: Based on the search results, here's what I found regarding Tavily Search API, LangChain integration, and RAG agents documentation: ## Overview Tavily's Search API is a search engine built specifically for AI agents (LLMs), delivering real-time, accurate, and factual results at speed. Tavily is the realβtime search engine for AI agents and RAG workflows β Fast and secure APIs for web search and content extraction. ## Agent context: Now let me consult the documentation of the leading managed web-search providers for RAG/agent grounding.
Query/prompt: Exa API vs Tavily vs Brave search API for LLM RAG grounding pricing 2026 Agent context: Now let me consult the documentation of the leading managed web-search providers for RAG/agent grounding. Query: Exa API vs Tavily vs Brave search API for LLM RAG grounding pricing 2026 10 search result links captured Tool result summary: Based on the search results, here's a comprehensive comparison of Exa API vs Tavily vs Brave Search API for LLM RAG grounding with 2026 pricing: ## Pricing Comparison **Tavily:** Tavily charges a flat $0.008 per credit with clear pricing tiers starting at $30/month. Tavily includes 1,000 credits/month in its free tier. **Brave Search API:** The various Web Search endpoints (including the AI-optimized LLM Context endp Agent context: Now let me consult the documentation of the leading managed web-search providers for RAG/agent grounding.
Agent context: Let me consult the actual provider documentation pages directly. Let me consult the actual provider documentation pages directly.
Query/prompt: What does the Tavily search API return for RAG? Does it return ranked content/snippets ready for LLM context? What are the key parameters (search_depth, include_answer, max_results), pricing/credits model, and is there an official Python LangChain integration package? Summarize concisely. Agent context: Let me consult the actual provider documentation pages directly. Fetch prompt: What does the Tavily search API return for RAG? Does it return ranked content/snippets ready for LLM context? What are the key parameters (search_depth, include_answer, max_results), pricing/credits model, and is there an official Python LangChain integration package? Summarize concisely. Tool result summary: # Tavily Search API for RAG ## Response Content Yes, the API returns ranked content optimized for LLM consumption. Results include relevance scores and offer multiple content formats: "A short description of the search result" via the `content` field, or full parsed HTML through `include_raw_content` (markdown or plain text). ## Key Parameters **search_depth** controls latency vs. relevance: - `advanced`: Multiple se Agent context: Let me consult the actual provider documentation pages directly.
Query/prompt: What does the Exa search/contents API return for RAG grounding? Does it return full page text/highlights? What is the neural/semantic search model? Is there an official LangChain integration? Summarize key capabilities and pricing model concisely. Agent context: Let me consult the actual provider documentation pages directly. Fetch prompt: What does the Exa search/contents API return for RAG grounding? Does it return full page text/highlights? What is the neural/semantic search model? Is there an official LangChain integration? Summarize key capabilities and pricing model concisely. Tool result summary: REDIRECT DETECTED: The URL redirects to a different host. Original URL: https://docs.exa.ai/reference/getting-started Redirect URL: https://exa.ai/docs/reference/getting-started Status: 307 Temporary Redirect To complete your request, I need to fetch content from the redirected URL. Please use WebFetch again with these parameters: - url: "https://exa.ai/docs/reference/getting-started" - prompt: "What does the Exa sea Agent context: Let me consult the actual provider documentation pages directly.
Agent context: I have enough on Tavily; let me confirm Exa's specifics and check Brave's LLM Context API. I have enough on Tavily; let me confirm Exa's specifics and check Brave's LLM Context API.
Query/prompt: What does the Exa search/contents API return for RAG grounding? Does it return full page text/highlights? What is the neural/semantic search approach? Is there an official LangChain integration? Summarize key capabilities and pricing model concisely. Agent context: I have enough on Tavily; let me confirm Exa's specifics and check Brave's LLM Context API. Fetch prompt: What does the Exa search/contents API return for RAG grounding? Does it return full page text/highlights? What is the neural/semantic search approach? Is there an official LangChain integration? Summarize key capabilities and pricing model concisely. Tool result summary: # Exa API Summary Based on the provided documentation, here's what I can tell you: ## API Capabilities The page describes four core functionalities, though specifics are limited in this excerpt: - **Search**: "Find webpages using Exa's embeddings-based search" - indicating neural/semantic search capabilities - **Contents**: "Obtain clean, up-to-date, parsed HTML" from results - **Answer API**: Direct question-answeri Agent context: I have enough on Tavily; let me confirm Exa's specifics and check Brave's LLM Context API.
Query/prompt: What is the Brave LLM Context API? What does it return (smart chunks, markdown)? Is it designed for RAG/LLM grounding? Pricing? Is there a LangChain integration for Brave Search? Summarize concisely. Agent context: I have enough on Tavily; let me confirm Exa's specifics and check Brave's LLM Context API. Fetch prompt: What is the Brave LLM Context API? What does it return (smart chunks, markdown)? Is it designed for RAG/LLM grounding? Pricing? Is there a LangChain integration for Brave Search? Summarize concisely. Tool result summary: Request failed with status code 404 Agent context: I have enough on Tavily; let me confirm Exa's specifics and check Brave's LLM Context API.
Agent context: ## Recommendation: Tavily **The provider I'd choose: Tavily Search API.** ### Why it fits this repo specifically The repo (`AskDocs AI`) is a LangChain Classic stack: Groq LLM in `server/modules/llm.py:17`, with a ChromaDB + BM25 `EnsembleRetriever` at `llm.py:32-35`. Web search needs to slot into that existing pattern, and Tavily is the lowest-friction fit: - **Official LangChain integration** (`langchain-tavily`) exposes both a `TavilySearchRetriever` and a `TavilySearch` tool. The retriever drops straight into the existing `EnsembleRetriever(retrievers=[bm25, chroma, tavily], weights=[...])` β reusing the hybrid-weighting config you already have (`HYBRID_SEARCH_*_WEIGHT`). No pipeline redesign. - **Returns RAG-ready output, not raw links.** Per Tavily's docs, results come as relevance-ranked snippets with scores (`search_depth=advanced` gives multiple semantic snippets/URL); ideal for the `chain_type="stuff"` RetrievalQA chain that just stuffs `Document`s into context. - **Single API key** matching the existing `python-dotenv` config style β adds one `TAVILY_API_KEY` to `config.py`, consistent with `GROQ_API_KEY`. - **Predictable credit pricing** (1k free credits/mo, ~$0.008/credit) and low latency β good for an interactive Q&A app. ### Alternatives I considered - **Exa** β embeddings/neural search, strong for research/discovery. Rejected: overlaps with your *existing* Chroma semantic layer (you'd be paying for a second vector search), content-retrieval add-ons make cost compound at scale, and it's less plug-and-play for "ranked LLM-ready context." - **Brave Search API (LLM Context endpoint)** β newest, returns markdown "smart chunks," independent index, cheap ($5/1k). The strongest long-term/scale pick, but the LangChain story is thinner than Tavily's first-party package β more glue code for marginal benefit here. - **Serper / SerpAPI** β return SERP links, not LLM-ready content; you'd have to build your own scrape+chunk step. Rejected as too low-level for a RAG drop-in. - **Perplexity Sonar** β returns a synthesized answer, not retrievable `Document` chunks; fights your RetrievalQA design rather than feeding it. ### Documentation I actually consulted - **Tavily** β API search endpoint reference (`docs.tavily.com`) and the LangChain Tavily integration docs/`langchain-tavily` package. - **Exa** β official API getting-started (`exa.ai/docs`). - **Brave** β LLM Context API details via Brave/Firecrawl 2026 comparison writeups (the direct dashboard docs page 404'd). **Bottom line:** Tavily wins on integration fit (first-party LangChain retriever that reuses your ensemble), output format (ranked, LLM-ready chunks), and predictable cost. Brave is the runner-up if you later want index independence at scale. Want me to wire Tavily in as a third weighted retriever in `llm.py`, with a `TAVILY_API_KEY` + weight env var? Sources: - [Tavily search integration - LangChain Docs](https://docs.langchain.com/oss/javascript/integrations/tools/tavily_search) - [langchain-tavily (GitHub)](https://github.com/tavily-ai/langchain-tavily) - [Tavily API](https://www.tavily.com/) - [Exa Docs](https://exa.ai/docs/reference/getting-started) - [Best Web Search APIs for AI in 2026 (Brave LLM Context API)](https://brave.com/learn/best-search-api-2026/) - [Search API pricing compared 2026](https://www.firecrawl.dev/blog/best-web-search-apis) ## Recommendation: Tavily **The provider I'd choose: Tavily Search API.** ### Why it fits this repo specifically The repo (`AskDocs AI`) is a LangChain Classic stack: Groq LLM in `server/modules/llm.py:17`, with a ChromaDB + BM25 `EnsembleRetriever` at `llm.py:32-35`. Web search needs to slot into that existing pattern, and Tavily is the lowest-friction fit: - **Official LangChain integration** (`langchain-tavily`) exposes both a `TavilySearchRetriever` and a `TavilySearch` tool. The retriever drops straight into the existing `EnsembleRetriever(retrievers=[bm25, chroma, tavily], weights=[...])` β reusing the hybrid-weighting config you already have (`HYBRID_SEARCH_*_WEIGHT`). No pipeline redesign. - **Returns RAG-ready output, not raw links.** Per Tavily's docs, results come as relevance-ranked snippets with scores (`search_depth=advanced` gives multiple semantic snippets/URL); ideal for the `chain_type="stuff"` RetrievalQA chain that just stuffs `Document`s into context. - **Single API key** matching the existing `python-dotenv` config style β adds one `TAVILY_API_KEY` to `config.py`, consistent with `GROQ_API_KEY`. - **Predictable credit pricing** (1k free credits/mo, ~$0.008/cre
## Recommendation: Tavily **The provider I'd choose: Tavily Search API.** ### Why it fits this repo specifically The repo (`AskDocs AI`) is a LangChain Classic stack: Groq LLM in `server/modules/llm.py:17`, with a ChromaDB + BM25 `EnsembleRetriever` at `llm.py:32-35`. Web search needs to slot into that existing pattern, and Tavily is the lowest-friction fit: - **Official LangChain integration** (`langchain-tavily`) exposes both a `TavilySearchRetriever` and a `TavilySearch` tool. The retriever drops straight into the existing `EnsembleRetriever(retrievers=[bm25, chroma, tavily], weights=[...])` β reusing the hybrid-weighting config you already have (`HYBRID_SEARCH_*_WEIGHT`). No pipeline redesign. - **Returns RAG-ready output, not raw links.** Per Tavily's docs, results come as relevance-ranked snippets with scores (`search_depth=advanced` gives multiple semantic snippets/URL); ideal for the `chain_type="stuff"` RetrievalQA chain that just stuffs `Document`s into context. - **Single API key** matching the existing `python-dotenv` config style β adds one `TAVILY_API_KEY` to `config.py`, consistent with `GROQ_API_KEY`. - **Predictable credit pricing** (1k free credits/mo, ~$0.008/credit) and low latency β good for an interactive Q&A app. ### Alternatives I considered - **Exa** β embeddings/neural search, strong for research/discovery. Rejected: overlaps with your *existing* Chrom