Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/Gauntlet-AIDP/rag-cookbook
/ functions
Functions
175 in github.com/Gauntlet-AIDP/rag-cookbook
⨍
Functions
175
◇
Types & classes
4
↓ 1 callers
Function
has_financial_figures
Check if text contains financial figures ($, %, large numbers).
02-metadata-filtered/ingestion.py:291
↓ 1 callers
Function
hybrid_search
Perform hybrid search combining BM25 and vector search. Args: query: Search query k: Number of final results bm2
03-hybrid-search/retrieval.py:165
↓ 1 callers
Function
hybrid_search
Perform hybrid search combining BM25 and vector search.
03-hybrid-search/generation.py:131
↓ 1 callers
Function
interactive_mode
Run interactive Q&A with graph-enhanced retrieval.
04-graph-rag/generation.py:164
↓ 1 callers
Function
interactive_mode
Run interactive Q&A with hybrid search.
03-hybrid-search/generation.py:256
↓ 1 callers
Function
interactive_mode
Run an interactive Q&A session with filter support.
02-metadata-filtered/generation.py:221
↓ 1 callers
Function
interactive_mode
Run an interactive Q&A session.
01-naive-rag/generation.py:111
↓ 1 callers
Function
interactive_mode
Run interactive Q&A with the agent.
05-agentic-rag/generation.py:17
↓ 1 callers
Function
judge_answer_quality
Judge the quality of an answer.
05-agentic-rag/evals/end_to_end.py:238
↓ 1 callers
Function
judge_decomposition
Use LLM to judge the quality of decomposition.
05-agentic-rag/evals/query_decomposition.py:256
↓ 1 callers
Function
judge_groundedness
Use LLM to judge if an answer is grounded in the context.
01-naive-rag/evals/groundedness.py:208
↓ 1 callers
Function
judge_relevance
Use LLM to judge if a document is relevant to the question.
02-metadata-filtered/evals/precision_delta.py:226
↓ 1 callers
Function
judge_relevance
Use LLM to judge if a document is relevant to the question.
01-naive-rag/evals/precision.py:144
↓ 1 callers
Function
load_and_chunk_pdfs
Load PDFs and split into chunks.
01-naive-rag/ingestion.py:42
↓ 1 callers
Function
load_and_chunk_pdfs_with_metadata
Load PDFs and split into chunks with rich metadata.
02-metadata-filtered/ingestion.py:346
↓ 1 callers
Function
load_chunks_from_mongo
Load document chunks from MongoDB.
04-graph-rag/graph_builder.py:96
↓ 1 callers
Function
main
Test graph-enhanced retrieval.
04-graph-rag/retrieval.py:361
↓ 1 callers
Function
main
Run example queries or interactive mode.
04-graph-rag/generation.py:236
↓ 1 callers
Function
main
Build the knowledge graph from MongoDB chunks.
04-graph-rag/graph_builder.py:349
↓ 1 callers
Function
main
Run the entity extraction evaluation.
04-graph-rag/evals/entity_extraction.py:393
↓ 1 callers
Function
main
Run the multi-hop reasoning evaluation.
04-graph-rag/evals/multi_hop_reasoning.py:461
↓ 1 callers
Function
main
Test hybrid retrieval and compare with individual methods.
03-hybrid-search/retrieval.py:313
↓ 1 callers
Function
main
Run example queries or interactive mode.
03-hybrid-search/generation.py:322
↓ 1 callers
Function
main
Test retrieval with various filters.
02-metadata-filtered/retrieval.py:380
↓ 1 callers
Function
main
Run example queries or interactive mode.
02-metadata-filtered/generation.py:363
↓ 1 callers
Function
main
Main ingestion pipeline with fast metadata extraction.
02-metadata-filtered/ingestion.py:538
↓ 1 callers
Function
main
Run the latency evaluation.
02-metadata-filtered/evals/latency.py:423
↓ 1 callers
Function
main
Run the precision delta evaluation.
02-metadata-filtered/evals/precision_delta.py:447
↓ 1 callers
Function
main
Test retrieval with a sample query.
01-naive-rag/retrieval.py:168
↓ 1 callers
Function
main
Run example queries or interactive mode.
01-naive-rag/generation.py:149
↓ 1 callers
Function
main
Main ingestion pipeline.
01-naive-rag/ingestion.py:144
↓ 1 callers
Function
main
Run the groundedness evaluation.
01-naive-rag/evals/groundedness.py:368
↓ 1 callers
Function
main
Run the precision evaluation.
01-naive-rag/evals/precision.py:278
↓ 1 callers
Function
main
Test the agentic RAG system.
05-agentic-rag/agent.py:394
↓ 1 callers
Function
main
Run the interactive agent.
05-agentic-rag/generation.py:84
↓ 1 callers
Function
main
Run the query decomposition evaluation.
05-agentic-rag/evals/query_decomposition.py:489
↓ 1 callers
Function
main
Run the tool selection evaluation.
05-agentic-rag/evals/tool_selection.py:363
↓ 1 callers
Function
main
Run the end-to-end evaluation.
05-agentic-rag/evals/end_to_end.py:476
↓ 1 callers
Function
measure_generation_latency
Measure generation latency and return answer. Returns: Tuple of (answer, latency_ms)
02-metadata-filtered/evals/latency.py:214
↓ 1 callers
Function
measure_retrieval_latency
Measure retrieval latency and return documents. Returns: Tuple of (documents, latency_ms)
02-metadata-filtered/evals/latency.py:176
↓ 1 callers
Function
print_graph_stats
Print statistics about the graph.
04-graph-rag/graph_builder.py:314
↓ 1 callers
Function
print_metadata_summary
Print summary of metadata in the collection.
02-metadata-filtered/ingestion.py:437
↓ 1 callers
Function
print_vector_search_index_instructions
Print instructions for creating the vector search index in MongoDB Atlas.
02-metadata-filtered/ingestion.py:482
↓ 1 callers
Function
print_vector_search_index_instructions
Print instructions for creating the vector search index in MongoDB Atlas.
01-naive-rag/ingestion.py:113
↓ 1 callers
Function
reciprocal_rank_fusion
Combine ranked lists using Reciprocal Rank Fusion.
04-graph-rag/retrieval.py:210
↓ 1 callers
Function
reciprocal_rank_fusion
Combine multiple ranked lists using Reciprocal Rank Fusion. RRF Score = sum(weight_i / (k + rank_i)) for each list Args:
03-hybrid-search/retrieval.py:118
↓ 1 callers
Function
reciprocal_rank_fusion
Combine ranked lists using Reciprocal Rank Fusion.
03-hybrid-search/generation.py:105
↓ 1 callers
Function
retrieve_and_compare
Retrieve using all three methods and compare results.
03-hybrid-search/retrieval.py:222
↓ 1 callers
Function
retrieve_documents
Retrieve the top-k most relevant documents for a given query. Args: query: The search query string top_k: Number of docu
01-naive-rag/retrieval.py:49
↓ 1 callers
Function
retrieve_documents
Retrieve top-k documents for a query.
01-naive-rag/evals/groundedness.py:145
↓ 1 callers
Function
retrieve_documents
Retrieve top-k documents for a query.
01-naive-rag/evals/precision.py:119
↓ 1 callers
Function
retrieve_documents_with_scores
Retrieve the top-k most relevant documents with similarity scores. Args: query: The search query string top_k: Number of
01-naive-rag/retrieval.py:73
↓ 1 callers
Function
run_evaluation
Run entity extraction evaluation on all test cases.
04-graph-rag/evals/entity_extraction.py:298
↓ 1 callers
Function
run_evaluation
Run multi-hop reasoning evaluation on all test cases.
04-graph-rag/evals/multi_hop_reasoning.py:354
↓ 1 callers
Function
run_evaluation
Run precision delta evaluation on all test cases. Returns: Dictionary with aggregate results
02-metadata-filtered/evals/precision_delta.py:317
↓ 1 callers
Function
run_evaluation
Run groundedness evaluation on all test cases. Returns aggregate results and per-question breakdown.
01-naive-rag/evals/groundedness.py:288
↓ 1 callers
Function
run_evaluation
Run precision evaluation on all test cases. Returns aggregate results and per-question breakdown.
01-naive-rag/evals/precision.py:210
↓ 1 callers
Function
run_evaluation
Run query decomposition evaluation on all test cases.
05-agentic-rag/evals/query_decomposition.py:374
↓ 1 callers
Function
run_evaluation
Run tool selection evaluation on all test cases.
05-agentic-rag/evals/tool_selection.py:269
↓ 1 callers
Function
run_evaluation
Run end-to-end evaluation on all test cases.
05-agentic-rag/evals/end_to_end.py:357
↓ 1 callers
Function
run_latency_evaluation
Run latency evaluation across all test cases. Args: test_cases: List of test cases to run k: Number of documents to retr
02-metadata-filtered/evals/latency.py:288
↓ 1 callers
Function
run_single_test
Run a single latency test. Returns: Dictionary with latency measurements
02-metadata-filtered/evals/latency.py:250
↓ 1 callers
Function
setup_mongodb_collection
Set up MongoDB collection for vector storage.
02-metadata-filtered/ingestion.py:400
↓ 1 callers
Function
setup_mongodb_collection
Set up MongoDB collection for vector storage.
01-naive-rag/ingestion.py:76
↓ 1 callers
Function
setup_neo4j_schema
Create indexes and constraints in Neo4j.
04-graph-rag/graph_builder.py:176
↓ 1 callers
Method
synthesize_answer
Synthesize final answer from all retrieved contexts.
05-agentic-rag/agent.py:247
↓ 1 callers
Function
vector_search
Standard vector similarity search. Args: query: Search query k: Number of documents to retrieve Returns:
05-agentic-rag/tools.py:78
Method
__init__
(self, uri: str, user: str, password: str)
04-graph-rag/retrieval.py:64
Method
__init__
(self, uri: str, user: str, password: str)
04-graph-rag/graph_builder.py:75
Method
__init__
(self, uri: str, user: str, password: str)
04-graph-rag/evals/multi_hop_reasoning.py:180
Method
__init__
(self, verbose: bool = True)
05-agentic-rag/agent.py:118
Function
find_paths_between_entities
Find paths between two entities in the graph.
04-graph-rag/evals/multi_hop_reasoning.py:238
Function
format_retrieved_context
Format retrieved documents into context string for LLM.
03-hybrid-search/retrieval.py:271
Function
judge_groundedness
Judge if an answer is grounded in the context.
05-agentic-rag/evals/end_to_end.py:195
Function
retrieve_with_filter_and_scores
Retrieve documents with metadata pre-filtering and similarity scores. Returns: List of tuples (document, score)
02-metadata-filtered/retrieval.py:223
← previous
101–175 of 175, ranked by callers