rag007 โ multi-backend retrieval-augmented generation with LangGraph
Project description
๐ซ rag007 โ Licensed to Retrieve
"The name's RAG. rag007."
Not just hybrid search. A true autonomous retrieval agent.
Shaken, not stirred โ plug in any vector store, any LLM, any reranker.
The mission: find the right documents, neutralise irrelevant noise, and deliver the answer. Every time.
from rag007 import init_agent
rag = init_agent("documents", model="openai:gpt-5.4", backend="qdrant")
state = rag.chat("What is the status of operation overlord?")
# Your answer. Shaken, not stirred.
๐ต๏ธ The Story
Somewhere in a dimly lit briefing room, the director leans forward.
"We have a problem. Millions of documents. One question. And the clock is ticking."
Most retrieval systems would send a junior analyst โ one search query, one pass, done. Fast, cheap, and dangerously incomplete. Easily fooled by keyword tricks. Blind to nuance. Useless when the answer hides three layers deep.
So they sent rag007.
Licensed to retrieve. Cool under pressure. Never satisfied with good enough.
Before every mission, rag007 visits Q's lab โ a fully equipped arsenal of intelligence tools:
- ๐๏ธ Backends โ eight field offices to choose from: Azure AI Search, Qdrant, ChromaDB, LanceDB, pgvector, DuckDB, Meilisearch, or a lightweight in-memory post for quick ops. Each office speaks the same language; swapping them requires nothing more than a new introduction.
- ๐ค LLMs โ the agency doesn't play favourites. OpenAI, Anthropic, Azure, Ollama, Vertex AI โ any intelligence source will do, as long as it delivers.
- ๐ Rerankers โ after the initial sweep, a specialist steps in. Cohere, HuggingFace cross-encoders, Jina, ColBERT, RankGPT โ precision instruments for separating signal from noise.
- ๐ ๏ธ Tools โ in dynamic situations, rag007 goes beyond fixed procedures. It inspects the index schema, samples real field values, constructs precise filter expressions on the fly, and boosts results by business signals. No mission is the same; no playbook is hardcoded.
Fully equipped, rag007 takes the field.
It doesn't just fire a single vector query and file a report. It plans โ decomposing the objective, assessing intent, deciding whether this calls for semantic finesse or raw keyword firepower. It infiltrates โ running multiple search variants simultaneously across BM25 and vector space, fusing the intelligence with Reciprocal Rank Fusion or Distribution-Based Score Fusion. It interrogates the results โ an LLM quality gate cross-examines every document, ruthlessly discarding anything that doesn't hold up under scrutiny. And when the trail goes cold, it doesn't retreat. It rewrites the query, recruits a swarm of parallel strategies, and keeps going until the mission is complete.
Only once the evidence is airtight does it surface the answer. Cited. Grounded. Delivered.
"Shaken, not stirred โ and always on target."
rag007 operates autonomously in the shadows of your vector store. No hardcoded pipelines. No fixed playbooks. Plug in any LLM, any backend, any reranker โ and it adapts to the terrain.
Not in the name of any crown or government. In the name of whoever is seeking the truth in their data.
The intelligence service for your documents. Ready for deployment.
๐ต๏ธ How It Works
Most RAG libraries are pipelines โ query in, documents out, done. rag007 is an agent.
Like a field operative, it doesn't execute a single search and report back. It thinks, adapts, and keeps going until the mission is complete:
- ๐ง Understands the intent โ rewrites your query into precise search keywords, detects whether it's a keyword lookup or semantic question, and adjusts the hybrid search ratio accordingly
- ๐ Searches intelligently โ runs multiple query variants simultaneously across BM25 and vector search, fuses the results, and re-ranks with a dedicated reranker
- ๐ง Judges the results โ an LLM quality gate evaluates whether the retrieved documents actually answer the question
- ๐ Adapts autonomously โ if results are off-target, rewrites the query and tries again; if a single approach fails, fans out into a swarm of parallel search strategies
- โ๏ธ Delivers the answer โ only once it's confident the evidence is solid does it generate a cited, grounded response
This is the difference between a search box and a field agent.
โจ Features
- ๐ต๏ธ True agentic loop โ retrieve โ judge โ rewrite โ retry, fully autonomous
- ๐ Hybrid search โ BM25 + vector, fused with RRF or DBSF
- ๐ง HyDE โ hypothetical document embeddings for better recall on vague queries
- ๐ Swarm retrieval โ fans out to parallel strategies when a single search fails
- ๐ ๏ธ Tool-calling agent โ
get_index_settings,get_filter_values,search_hybrid,search_bm25,rerank_resultsโ LLM picks tools dynamically - ๐ Multi-reranker โ Cohere, HuggingFace, Jina, ColBERT, RankGPT, or custom
- ๐๏ธ 8 backends โ Meilisearch, Azure AI Search, ChromaDB, LanceDB, Qdrant, pgvector, DuckDB, InMemory
- ๐ค Any LLM โ OpenAI, Azure, Anthropic, Ollama, Vertex AI, or any LangChain model
- โก One-line init โ
init_agent("docs", model="openai:gpt-5.4", backend="qdrant")โ no imports needed - ๐ฌ Multi-turn chat โ conversation history with citation-aware answers
- ๐ฏ Auto-strategy โ LLM samples your collection and tunes itself automatically
- ๐ Async-native โ every operation has a sync and async variant
๐ฆ Install
pip install rag007
Optional backends & extras
pip install rag007[meilisearch] # ๐ Meilisearch
pip install rag007[azure] # โ๏ธ Azure AI Search
pip install rag007[chromadb] # ๐ฃ ChromaDB
pip install rag007[lancedb] # ๐น LanceDB
pip install rag007[pgvector] # ๐ PostgreSQL + pgvector
pip install rag007[qdrant] # ๐ก Qdrant
pip install rag007[duckdb] # ๐ฆ DuckDB
pip install rag007[cohere] # ๐
Cohere reranker
pip install rag007[huggingface] # ๐ค HuggingFace cross-encoder (local)
pip install rag007[jina] # ๐ Jina reranker
pip install rag007[rerankers] # ๐ฏ rerankers (ColBERT, Flashrank, RankGPT, โฆ)
pip install rag007[cli] # ๐ฅ๏ธ Interactive CLI
pip install rag007[all] # ๐ธ Everything, shaken not stirred
๐ Quick Start
One-liner with init_agent
The fastest way to get started โ no provider imports, string aliases for everything:
from rag007 import init_agent
# Minimal โ in-memory backend, LLM from env vars
rag = init_agent("docs")
# OpenAI + Qdrant + Cohere reranker
rag = init_agent(
"my-collection",
model="openai:gpt-5.4",
backend="qdrant",
backend_url="http://localhost:6333",
reranker="cohere",
)
# Anthropic + Azure AI Search (native vectorisation, no client-side embeddings)
rag = init_agent(
"my-index",
model="anthropic:claude-sonnet-4-6",
gen_model="anthropic:claude-opus-4-6",
backend="azure",
backend_url="https://my-search.search.windows.net",
reranker="huggingface",
auto_strategy=True,
)
# Fully local โ Ollama + ChromaDB + HuggingFace cross-encoder
rag = init_agent(
"docs",
model="ollama:llama3",
backend="chroma",
reranker="huggingface",
reranker_model="cross-encoder/ms-marco-MiniLM-L-6-v2",
)
Backend aliases
| Alias | Class | Extra |
|---|---|---|
"memory" / "in_memory" |
InMemoryBackend |
(none) |
"chroma" / "chromadb" |
ChromaDBBackend |
rag007[chromadb] |
"qdrant" |
QdrantBackend |
rag007[qdrant] |
"lancedb" / "lance" |
LanceDBBackend |
rag007[lancedb] |
"duckdb" |
DuckDBBackend |
rag007[duckdb] |
"pgvector" / "pg" |
PgvectorBackend |
rag007[pgvector] |
"meilisearch" |
MeilisearchBackend |
rag007[meilisearch] |
"azure" |
AzureAISearchBackend |
rag007[azure] |
Reranker aliases
| Alias | Class | reranker_model |
Extra |
|---|---|---|---|
"cohere" |
CohereReranker |
Cohere model name (default: rerank-v3.5) |
rag007[cohere] |
"huggingface" / "hf" |
HuggingFaceReranker |
HF model name (default: cross-encoder/ms-marco-MiniLM-L-6-v2) |
rag007[huggingface] |
"jina" |
JinaReranker |
Jina model name (default: jina-reranker-v2-base-multilingual) |
rag007[jina] |
"llm" |
LLMReranker |
(uses the agent's LLM) | (none) |
"rerankers" |
RerankersReranker |
Any model from the rerankers library |
rag007[rerankers] |
# Cohere (default model)
rag = init_agent("docs", model="openai:gpt-5.4", reranker="cohere")
# HuggingFace โ multilingual model
rag = init_agent("docs", model="openai:gpt-5.4", reranker="huggingface",
reranker_model="cross-encoder/mmarco-mMiniLMv2-L12-H384-v1")
# Jina
rag = init_agent("docs", model="openai:gpt-5.4", reranker="jina") # uses JINA_API_KEY
# ColBERT via rerankers library
rag = init_agent("docs", model="openai:gpt-5.4", reranker="rerankers",
reranker_model="colbert-ir/colbertv2.0",
reranker_kwargs={"model_type": "colbert"})
# Pass a pre-built reranker instance directly
from rag007 import CohereReranker
rag = init_agent("docs", reranker=CohereReranker(model="rerank-v3.5", api_key="..."))
Model strings: any "provider:model-name" from LangChain's init_chat_model โ openai, anthropic, azure_openai, google_vertexai, ollama, groq, mistralai, and more
Manual setup
from rag007 import Agent, InMemoryBackend
backend = InMemoryBackend(embed_fn=my_embed_fn)
backend.add_documents([
{"content": "RAG combines retrieval with generation", "source": "wiki"},
{"content": "Vector search finds similar embeddings", "source": "docs"},
])
rag = Agent(index="demo", backend=backend)
# Single query โ full answer
state = rag.invoke("What is retrieval-augmented generation?")
print(state.answer)
# Retrieve only โ documents without LLM answer
query, docs = rag.retrieve_documents("What is retrieval-augmented generation?")
for doc in docs:
print(doc.page_content)
# Override top-K at call time
query, docs = rag.retrieve_documents("hybrid search", top_k=3)
Agent.from_model โ model string with explicit backend
from rag007 import Agent, QdrantBackend
rag = Agent.from_model(
"openai:gpt-5.4-mini", # fast model for routing & rewriting
index="docs",
gen_model="openai:gpt-5.4", # powerful model for the final answer
backend=QdrantBackend("docs", url="http://localhost:6333"),
)
๐ฌ Multi-turn Chat
from rag007 import Agent, ConversationTurn
rag = Agent(index="articles")
history: list[ConversationTurn] = []
state = rag.chat("What is hybrid search?", history)
history.append(ConversationTurn(question="What is hybrid search?", answer=state.answer))
state = rag.chat("How does it compare to pure vector search?", history)
print(state.answer)
print(f"Sources: {len(state.documents)}")
Async variant:
state = await rag.achat("What is hybrid search?", history)
๐๏ธ Architecture
rag007 has two operating modes โ both fully autonomous:
Graph mode (rag.chat / rag.invoke)
The default. A LangGraph state machine that runs the full agentic pipeline:
Query
โ
โโ[HyDE]โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Hypothetical document embedding (parallel) โ
โ โผ
โผ [Embed HyDE text]
[Preprocess] โ
Extract keywords + variants โ
Detect semantic_ratio + fusion strategy โ
โ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ
โผ
[Hybrid Search ร N queries]
BM25 + Vector, multi-arm
โ
โผ
[RRF / DBSF Fusion]
โ
โผ
[Rerank]
Cohere / HF / Jina / LLM
โ
โผ
[Quality Gate]
LLM judges relevance
โ โ
(good) (bad)
โ โ
โผ โผ
[Generate] [Rewrite] โโโบ loop (max_iter)
โ
โผ
Answer + [n] inline citations
Tool-calling agent mode (rag.invoke_agent)
The agent receives a set of tools and reasons step-by-step, calling them in whatever order makes sense for the question. No fixed pipeline โ pure field improvisation:
Query
โ
โผ
[LLM Agent] โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Thinks: "What do I need to answer this?" โ
โ โ
โโโ get_index_settings() โ
โ Discover filterable / sortable / boost fields โ
โ โ
โโโ get_filter_values(field) โ
โ Sample real stored values for a field โ
โ โ build precise filter expressions โ
โ โ
โโโ search_hybrid(query, filter, sort_fields) โ
โ BM25 + vector, optional filter + sort boost โ
โ โ
โโโ search_bm25(query, filter) โ
โ Fallback pure keyword search โ
โ โ
โโโ rerank_results(query, hits) โ
โ Re-rank with configured reranker โ
โ โ
โโโ [needs more info?] โโโโโโโโโโโโโโโโโโโโโโโโโโบ โ
[done]
โ
โผ
Answer (tool calls explained inline)
Use invoke_agent when questions involve dynamic filtering โ the agent inspects the index schema, samples real field values, builds filters on the fly, and decides whether to sort by business signals like popularity or recency.
๐๏ธ Backends
โ๏ธ Azure AI Search
Native hybrid search โ no client-side embeddings needed when the index has an integrated vectorizer:
from rag007 import Agent, AzureAISearchBackend
# Native vectorization โ service embeds the query server-side
rag = Agent(
index="my-index",
backend=AzureAISearchBackend(
"my-index",
endpoint="https://my-search.search.windows.net",
api_key="...",
),
)
# Client-side vectorization
rag = Agent(
index="my-index",
backend=AzureAISearchBackend(
"my-index",
endpoint="https://my-search.search.windows.net",
api_key="...",
embed_fn=my_embed_fn,
),
)
# With Azure semantic reranking
rag = Agent(
index="my-index",
backend=AzureAISearchBackend(
"my-index",
endpoint="https://my-search.search.windows.net",
api_key="...",
semantic_config="my-semantic-config",
),
)
๐ก Qdrant
from rag007 import Agent, QdrantBackend
rag = Agent(
index="my_collection",
backend=QdrantBackend("my_collection", url="http://localhost:6333", embed_fn=my_embed_fn),
)
๐ฃ ChromaDB
from rag007 import Agent, ChromaDBBackend
rag = Agent(
index="my_collection",
backend=ChromaDBBackend("my_collection", path="./chroma_db", embed_fn=my_embed_fn),
)
๐น LanceDB
from rag007 import Agent, LanceDBBackend
rag = Agent(
index="docs",
backend=LanceDBBackend("docs", db_uri="./lancedb", embed_fn=my_embed_fn),
)
๐ PostgreSQL + pgvector
from rag007 import Agent, PgvectorBackend
rag = Agent(
index="documents",
backend=PgvectorBackend(
"documents",
dsn="postgresql://user:pass@localhost:5432/mydb",
embed_fn=my_embed_fn,
),
)
๐ฆ DuckDB
from rag007 import Agent, DuckDBBackend
rag = Agent(
index="vectors",
backend=DuckDBBackend("vectors", db_path="./my.duckdb", embed_fn=my_embed_fn),
)
๐ Meilisearch
from rag007 import Agent, MeilisearchBackend
rag = Agent(
index="articles",
backend=MeilisearchBackend("articles", url="http://localhost:7700", api_key="masterKey"),
)
๐ฆ InMemory (default, zero dependencies)
from rag007 import Agent, InMemoryBackend
backend = InMemoryBackend(embed_fn=my_embed_fn)
backend.add_documents([
{"content": "RAG combines retrieval with generation", "source": "wiki"},
{"content": "Vector search finds similar embeddings", "source": "docs"},
])
rag = Agent(index="demo", backend=backend)
๐ค LLM Configuration
Pass a pre-built LangChain model or use init_agent / Agent.from_model for string-based init.
When using Agent directly, configure via env vars or pass an explicit model instance.
OpenAI
from langchain_openai import ChatOpenAI
from rag007 import Agent
rag = Agent(
index="articles",
llm=ChatOpenAI(model="gpt-5.4", api_key="sk-..."),
gen_llm=ChatOpenAI(model="gpt-5.4", api_key="sk-..."),
)
Azure OpenAI (explicit keys)
from langchain_openai import AzureChatOpenAI
from rag007 import Agent
llm = AzureChatOpenAI(
azure_endpoint="https://my-resource.openai.azure.com",
azure_deployment="gpt-5.4",
api_key="...",
api_version="2024-12-01-preview",
)
rag = Agent(index="articles", llm=llm, gen_llm=llm)
Azure OpenAI (env vars)
# Set: AZURE_OPENAI_ENDPOINT, AZURE_OPENAI_API_KEY, AZURE_OPENAI_DEPLOYMENT
from rag007 import Agent
rag = Agent(index="articles") # auto-detected
Azure OpenAI with Managed Identity (no API key)
from azure.identity import DefaultAzureCredential, get_bearer_token_provider
from langchain_openai import AzureChatOpenAI
from rag007 import Agent
token_provider = get_bearer_token_provider(
DefaultAzureCredential(), "https://cognitiveservices.azure.com/.default"
)
llm = AzureChatOpenAI(
azure_endpoint="https://my-resource.openai.azure.com",
azure_deployment="gpt-5.4",
azure_ad_token_provider=token_provider,
api_version="2024-12-01-preview",
)
rag = Agent(index="articles", llm=llm, gen_llm=llm)
Anthropic Claude
pip install langchain-anthropic
from langchain_anthropic import ChatAnthropic
from rag007 import Agent
llm = ChatAnthropic(model="claude-sonnet-4-6", api_key="sk-ant-...")
rag = Agent(index="articles", llm=llm, gen_llm=llm)
Ollama (local, no API key)
pip install langchain-ollama
from langchain_ollama import ChatOllama
from rag007 import Agent
rag = Agent(
index="articles",
llm=ChatOllama(model="llama3.2", base_url="http://localhost:11434"),
gen_llm=ChatOllama(model="llama3.2", base_url="http://localhost:11434"),
)
Google Vertex AI
pip install langchain-google-vertexai
from langchain_google_vertexai import ChatVertexAI
from rag007 import Agent
llm = ChatVertexAI(model="gemini-2.0-flash", project="my-gcp-project", location="us-central1")
rag = Agent(index="articles", llm=llm, gen_llm=llm)
Separate fast and generation models
Use a cheap/fast model for query rewriting and routing, a powerful model for the final answer:
from langchain_openai import AzureChatOpenAI
from rag007 import Agent
fast_llm = AzureChatOpenAI(azure_deployment="gpt-5.4-mini", api_key="...", api_version="2024-12-01-preview")
gen_llm = AzureChatOpenAI(azure_deployment="gpt-5.4", api_key="...", api_version="2024-12-01-preview")
rag = Agent(index="articles", llm=fast_llm, gen_llm=gen_llm)
๐ Rerankers
๐ Cohere
from rag007 import Agent, CohereReranker
rag = Agent(index="articles", reranker=CohereReranker(model="rerank-v3.5", api_key="..."))
๐ค HuggingFace cross-encoder (local, no API key)
pip install rag007[huggingface]
from rag007 import Agent, HuggingFaceReranker
rag = Agent(index="articles", reranker=HuggingFaceReranker())
# Multilingual
rag = Agent(index="articles", reranker=HuggingFaceReranker(model="cross-encoder/mmarco-mMiniLMv2-L12-H384-v1"))
๐ Jina (multilingual API)
pip install rag007[jina]
from rag007 import Agent, JinaReranker
rag = Agent(index="articles", reranker=JinaReranker(api_key="...")) # or JINA_API_KEY env var
๐ฏ rerankers โ ColBERT / Flashrank / RankGPT / any cross-encoder
Unified bridge to the rerankers library by answer.ai:
pip install rag007[rerankers]
from rag007 import Agent, RerankersReranker
rag = Agent(index="articles", reranker=RerankersReranker("cross-encoder/ms-marco-MiniLM-L-6-v2", model_type="cross-encoder"))
rag = Agent(index="articles", reranker=RerankersReranker("colbert-ir/colbertv2.0", model_type="colbert"))
rag = Agent(index="articles", reranker=RerankersReranker("flashrank", model_type="flashrank"))
rag = Agent(index="articles", reranker=RerankersReranker("gpt-5.4-mini", model_type="rankgpt", api_key="..."))
๐ง Custom reranker
from rag007 import Agent, RerankResult
class MyReranker:
def rerank(self, query: str, documents: list[str], top_n: int) -> list[RerankResult]:
return [RerankResult(index=i, relevance_score=1.0 / (i + 1)) for i in range(top_n)]
rag = Agent(index="articles", reranker=MyReranker())
๐ ๏ธ Tools
When using invoke_agent, the LLM has access to a set of tools it can call in any order. No fixed pipeline โ the agent decides what it needs.
| Tool | Description |
|---|---|
get_index_settings() |
Discover filterable, searchable, sortable, and boost fields from the index schema |
get_filter_values(field) |
Sample real stored values for a field โ used to build precise filter expressions |
search_hybrid(query, filter_expr, semantic_ratio, sort_fields) |
BM25 + vector hybrid search with optional filter and sort boost |
search_bm25(query, filter_expr) |
Pure keyword search โ fallback when hybrid returns poor results |
rerank_results(query, hits) |
Re-rank a list of hits with the configured reranker |
The agent follows this reasoning pattern:
- Call
get_index_settings()to learn the schema - If the question names a specific entity, call
get_filter_values(field)to find the exact stored value - Call
search_hybrid()with a filter and/or sort if relevant, otherwise broad hybrid search - Fall back to
search_bm25()if results are thin - Call
rerank_results()to surface the most relevant hits - Summarise โ explaining which filters and signals influenced the answer
from rag007 import Agent
rag = Agent(index="products")
# Agent inspects schema, detects brand field, samples values,
# builds filter, sorts by popularity signal โ all autonomously
result = rag.invoke_agent("Show me the most popular Bosch power tools")
print(result)
โ๏ธ Constructor Reference
Agent(
index="my_index", # collection / index name
backend=..., # SearchBackend (default: InMemoryBackend)
llm=..., # fast LLM โ routing, rewrite, filter
gen_llm=..., # generation LLM โ final answer
reranker=..., # Cohere / HuggingFace / Jina / custom
top_k=10, # final result count [RAG_TOP_K]
rerank_top_n=5, # reranker top-n [RAG_RERANK_TOP_N]
retrieval_factor=4, # over-retrieval multiplier [RAG_RETRIEVAL_FACTOR]
max_iter=20, # max retrieve-rewrite cycles [RAG_MAX_ITER]
semantic_ratio=0.5, # hybrid semantic weight [RAG_SEMANTIC_RATIO]
fusion="rrf", # "rrf" or "dbsf" [RAG_FUSION]
instructions="", # extra system prompt for generation
embed_fn=None, # (str) -> list[float]
boost_fn=None, # (doc_dict) -> float score boost
base_filter=None, # always-on filter expression
hyde_min_words=8, # min words to trigger HyDE [RAG_HYDE_MIN_WORDS]
hyde_style_hint="", # style hint for HyDE prompt
auto_strategy=False, # auto-tune from index samples
)
๐ก API Reference
| Method | Returns | Description |
|---|---|---|
rag.invoke(query) |
RAGState |
Full RAG pipeline (sync) |
rag.ainvoke(query) |
RAGState |
Full RAG pipeline (async) |
rag.chat(query, history) |
RAGState |
Multi-turn chat (sync) |
rag.achat(query, history) |
RAGState |
Multi-turn chat (async) |
rag.retrieve_documents(query, top_k) |
(str, list[Document]) |
Retrieve only, no answer |
rag.query(query) |
str |
Answer string directly |
rag.invoke_agent(query) |
str |
Tool-calling agent mode (sync) |
rag.ainvoke_agent(query) |
str |
Tool-calling agent mode (async) |
RAGState fields: answer ยท documents ยท query ยท question ยท history ยท iterations
๐ Environment Variables
| Variable | Description | Default |
|---|---|---|
AZURE_OPENAI_ENDPOINT |
Azure OpenAI endpoint | โ |
AZURE_OPENAI_API_KEY |
Azure OpenAI API key | โ |
AZURE_OPENAI_DEPLOYMENT |
Default deployment | โ |
AZURE_OPENAI_FAST_DEPLOYMENT |
Fast model deployment | โ DEPLOYMENT |
AZURE_OPENAI_GENERATION_DEPLOYMENT |
Generation deployment | โ DEPLOYMENT |
AZURE_OPENAI_API_VERSION |
API version | 2024-12-01-preview |
OPENAI_API_KEY |
OpenAI API key (fallback) | โ |
OPENAI_MODEL |
OpenAI model name | gpt-5.4 |
AZURE_COHERE_ENDPOINT |
Azure Cohere endpoint | โ |
AZURE_COHERE_API_KEY |
Azure Cohere API key | โ |
COHERE_API_KEY |
Cohere API key (fallback) | โ |
JINA_API_KEY |
Jina reranker API key | โ |
MEILI_URL |
Meilisearch URL | http://localhost:7700 |
MEILI_KEY |
Meilisearch API key | masterKey |
RAG_TOP_K |
Final result count | 10 |
RAG_RERANK_TOP_N |
Reranker top-n | 5 |
RAG_RETRIEVAL_FACTOR |
Over-retrieval multiplier | 4 |
RAG_SEMANTIC_RATIO |
Hybrid semantic weight | 0.5 |
RAG_FUSION |
Fusion strategy | rrf |
RAG_HYDE_MIN_WORDS |
Min words to trigger HyDE | 8 |
๐ฅ๏ธ CLI
"The gadgets are ready."
pip install rag007[cli]
# ๐ฌ Chat mode โ full agentic pipeline
rag007 --chat --collection my_index
# ๐ Retriever mode โ documents only, no LLM
rag007 --retriever --collection my_index
# ๐ฏ Retrieve top-K only
rag007 --retriever --collection my_index --top-k 5
rag007 --retriever -c my_index -k 5
๐ License
MIT โ Licence to code.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file rag007-0.1.0.tar.gz.
File metadata
- Download URL: rag007-0.1.0.tar.gz
- Upload date:
- Size: 388.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a8c2ef29fd31cfcf81fe4b564f9e0b3f31055fc21ae6dbeec193956a262ebeb6
|
|
| MD5 |
1263e818f83d706e451214faf47ef1dd
|
|
| BLAKE2b-256 |
c6c5d9777cd480deded31620d39d388b50173f730c2b066b7382be4b8ddf06f6
|
Provenance
The following attestation bundles were made for rag007-0.1.0.tar.gz:
Publisher:
workflow.yml on bmsuisse/rag007
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
rag007-0.1.0.tar.gz -
Subject digest:
a8c2ef29fd31cfcf81fe4b564f9e0b3f31055fc21ae6dbeec193956a262ebeb6 - Sigstore transparency entry: 1287605547
- Sigstore integration time:
-
Permalink:
bmsuisse/rag007@32703551a9a9fe7f5bad536bfbe937b0f5ed6374 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/bmsuisse
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
workflow.yml@32703551a9a9fe7f5bad536bfbe937b0f5ed6374 -
Trigger Event:
push
-
Statement type:
File details
Details for the file rag007-0.1.0-py3-none-any.whl.
File metadata
- Download URL: rag007-0.1.0-py3-none-any.whl
- Upload date:
- Size: 45.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8141b647181ee554b08559439ac15af71d8ed2fb671134d8e309552f707a53a1
|
|
| MD5 |
0ca749dbc8d3f881362ad111085c4ac8
|
|
| BLAKE2b-256 |
7c3183ea8c5dddf7f2bc7c0e34f1ca9cba104babda885d72c3d53c1dbff52e63
|
Provenance
The following attestation bundles were made for rag007-0.1.0-py3-none-any.whl:
Publisher:
workflow.yml on bmsuisse/rag007
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
rag007-0.1.0-py3-none-any.whl -
Subject digest:
8141b647181ee554b08559439ac15af71d8ed2fb671134d8e309552f707a53a1 - Sigstore transparency entry: 1287605574
- Sigstore integration time:
-
Permalink:
bmsuisse/rag007@32703551a9a9fe7f5bad536bfbe937b0f5ed6374 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/bmsuisse
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
workflow.yml@32703551a9a9fe7f5bad536bfbe937b0f5ed6374 -
Trigger Event:
push
-
Statement type: