
Test how embedding settings work with retrieval configuration to produce final answers
Test how your embedding settings work together with retrieval configuration to produce final answers. While Step 2 tested embedding search in isolation, this step validates the complete pipeline from query to answer.
Entry Point: Pipeline Configuration tab → "Test Pipeline" button
Prerequisites: Embedding search completed with acceptable scores (Step 2)
Expected Outcome: Optimized Top-K and retrieval settings for your use case
Navigate to your RAG project and find the Pipeline Configuration tab. Click the "Test Pipeline" button to open the testing interface.
The Pipeline Test interface includes:
User Query → [Query Processing] → [Vector Search] → [BM25 (optional)] → [Re-ranking] → [Top-K Selection] → [Context Assembly] → LLM → Answer
| Component | Purpose | Configurable |
|---|---|---|
| Query Processing | Prepares user query | No |
| Vector Search | Semantic similarity search | Embedding model |
| BM25 Search | Keyword matching | On/Off toggle |
| Re-ranking | Sorts combined results | Ranking method |
| Top-K Selection | Selects chunks for context | K value |
| Context Assembly | Formats chunks for LLM | Template |
| LLM | Generates final answer | Model, temperature |
Top-K determines how many chunks are included in the context sent to the LLM.
| Top-K Value | Use Case | Trade-offs |
|---|---|---|
| 3-5 | Simple Q&A, concise answers | Faster, may miss context |
| 5-10 | Standard use case | Balanced |
| 10-20 | Complex analysis, research | More context, slower, higher token cost |
Recommendations:
BM25 combines keyword matching with semantic search.
| Scenario | BM25 Recommended | Why |
|---|---|---|
| Technical documentation | ✅ Yes | Proper nouns, version numbers |
| Code repositories | ✅ Yes | Exact function names |
| Legal documents | ✅ Yes | Specific terms matter |
| General FAQ | ❌ No | Semantic search sufficient |
| Creative content | ❌ No | Meaning over exact terms |
Expected Impact:
| Method | Description | Best For |
|---|---|---|
| Standard Vector | Pure semantic search | General purpose |
| Hybrid (BM25 + Vector) | Keyword + semantic combined | Technical, specific terms |
| Contextual Retrieval | LLM-enhanced context | Complex documents |
| ML-Optimized | Multi-level summaries | Hierarchical content |
Using the same queries enables:
Start with Top-K = 5:
Increase if:
Decrease if:
Test with BM25 Off:
Test with BM25 On:
Decision Criteria:
Check these aspects:
Answer Accuracy:
Source Attribution:
Response Coherence:
Processing Time:
Query: "What is the return policy for electronics?"
Settings: Top-K=5, BM25=Enabled
─────────────────────────────────────────────────
Retrieved Chunks:
1. [Score: 0.89] "Electronics returns accepted within 30 days..."
Source: policy.pdf, Chunk 3
2. [Score: 0.85] "Return policy overview: All products..."
Source: policy.pdf, Chunk 1
3. [Score: 0.82] "Electronics category specific rules..."
Source: electronics-faq.md, Chunk 2
4. [Score: 0.78] "Refund processing timeline..."
Source: policy.pdf, Chunk 5
5. [Score: 0.75] "Exception items: Software, DVDs..."
Source: returns.md, Chunk 4
Generated Answer:
"Electronics can be returned within 30 days of purchase.
Refunds are processed within 5-7 business days. Note that
opened software and DVDs are exceptions and cannot be returned."
Sources:
- policy.pdf (page 3)
- electronics-faq.md
Processing Time: 1.23s
Token Usage: 156 tokens
Top-K = 3:
{
"results": [/* 3 chunks */],
"response": "Concise answer with limited context",
"processing_time": 0.8
}Top-K = 10:
{
"results": [/* 10 chunks */],
"response": "Comprehensive answer with more detail",
"processing_time": 2.1
}BM25 Disabled:
{
"results": [
{ "similarity_score": 0.85, "content": "..." }
]
}BM25 Enabled:
{
"results": [
{
"similarity_score": 0.82,
"keyword_score": 0.91,
"combined_score": 0.87,
"content": "..."
}
]
}Solutions:
Solutions:
Solutions:
Solutions:
Proceed to API Deployment when:
Stay in Step 3 and iterate when:
| Issue | Possible Cause | Solution |
|---|---|---|
| Answer doesn't match sources | Wrong Top-K | Adjust Top-K value |
| Slow processing | High Top-K | Reduce to 5-10 |
| Missing key info | BM25 disabled | Enable for technical terms |
| Verbose answers | Top-K too high | Decrease to 3-5 |
| Inconsistent answers | Retrieval method mismatch | Try different method |
Once pipeline configuration is optimized, proceed to Step 4: Deploy API Endpoint to configure and test your production API.