# Demo Queries & Expected Results
This document shows example queries you can run through the MCP server or Streamlit UI.
## Query 1: Cross-Document Synthesis
**Query**: "What are the main challenges in RAG systems?"
**Expected Results**:
- Retrieval quality issues
- Context window limitations
- Hallucination prevention
- Latency optimization
**Sample Sources**: Papers discussing RAG architectures, retrieval methods
---
## Query 2: Technical Explanations
**Query**: "Explain transformer attention mechanisms"
**Expected Results**:
- Self-attention concept
- Query, Key, Value matrices
- Multi-head attention
- Positional encoding
**Sample Sources**: Transformer architecture papers, attention mechanism studies
---
## Query 3: Method Comparison
**Query**: "Compare different fine-tuning approaches for LLMs"
**Expected Results**:
- Full fine-tuning vs parameter-efficient methods
- LoRA, prefix tuning, adapter layers
- Trade-offs (cost, performance, efficiency)
**Sample Sources**: Fine-tuning methodology papers
---
## Query 4: Concept Deep-Dive
**Query**: "How does RLHF improve language model alignment?"
**Expected Results**:
- Reinforcement learning from human feedback process
- Reward modeling
- Policy optimization
- Alignment with human preferences
**Sample Sources**: RLHF papers, alignment research
---
## Query 5: Recent Developments
**Query**: "What are prompt engineering best practices?"
**Expected Results**:
- Chain-of-thought prompting
- Few-shot learning
- Instruction tuning
- Prompt optimization techniques
**Sample Sources**: Prompt engineering papers and guides
---
## Testing These Queries
### Via Streamlit UI
1. Open `http://localhost:8501`
2. Go to "Search Test" page
3. Enter query
4. View results with sources and scores
### Via Claude Desktop
1. Start MCP server: `python mcp_server/server.py`
2. Open Claude Desktop
3. Ask: "Use the research assistant to search: [your query]"
4. Claude will call the MCP tool and return formatted results
### Via CLI Test Script
```bash
python -c "
from rag_pipeline import VectorStore
v = VectorStore(use_local=True)
results = v.search('What are RAG challenges?', top_k=3)
for r in results:
print(f\"Score: {r['score']:.3f} | Source: {r['metadata']['title']}\")
print(f\"Text: {r['text'][:200]}...\n\")
"
```
---
## Performance Expectations
For the sample queries above with ~1800 chunks indexed:
- **Latency**: 200-400ms per query
- **Accuracy**: Top-3 results should contain relevant content
- **Relevance Scores**: >0.7 for good matches
## Adding Your Own Queries
1. Create a query based on your research domain
2. Test it through the UI
3. Check if top-3 results are relevant
4. Adjust `TOP_K_RESULTS` or chunking strategy if needed