USAGE_EXAMPLES.md•6.82 kB
# Enhanced Calibre RAG MCP Server - Usage Examples
This document provides practical examples of how to use the enhanced RAG capabilities.
## Example 1: Steel Building Design Project
### Step 1: Search for Relevant Books
```json
{
"tool": "search",
"arguments": {
"query": "structural steel design AISC building",
"limit": 10
}
}
```
### Step 2: Create Project
```json
{
"tool": "create_project",
"arguments": {
"name": "steel_building_2024",
"description": "Steel building design references for 2024 project including AISC standards and seismic design"
}
}
```
### Step 3: Add Selected Books
```json
{
"tool": "add_books_to_project",
"arguments": {
"project_name": "steel_building_2024",
"book_ids": [123, 456, 789]
}
}
```
### Step 4: Query for Context
```json
{
"tool": "search_project_context",
"arguments": {
"project_name": "steel_building_2024",
"query": "lateral bracing requirements steel moment frames",
"limit": 5
}
}
```
## Example 2: Concrete Bridge Analysis
### Project Setup
```json
{
"tool": "create_project",
"arguments": {
"name": "concrete_bridge_analysis",
"description": "Concrete bridge design and analysis references including ACI codes and finite element methods"
}
}
```
### Search and Add Books
```json
// First search for concrete bridge books
{
"tool": "search",
"arguments": {
"query": "concrete bridge design ACI finite element",
"limit": 15
}
}
// Then add relevant books
{
"tool": "add_books_to_project",
"arguments": {
"project_name": "concrete_bridge_analysis",
"book_ids": [234, 567, 890, 111]
}
}
```
### Context Queries
```json
// Query about prestressed concrete
{
"tool": "search_project_context",
"arguments": {
"project_name": "concrete_bridge_analysis",
"query": "prestressed concrete bridge design post-tensioning",
"limit": 3
}
}
// Query about seismic design
{
"tool": "search_project_context",
"arguments": {
"project_name": "concrete_bridge_analysis",
"query": "seismic design concrete bridges isolation bearings",
"limit": 4
}
}
```
## Example 3: Project Management
### List All Projects
```json
{
"tool": "list_projects",
"arguments": {}
}
```
### Get Project Information
```json
{
"tool": "get_project_info",
"arguments": {
"project_name": "steel_building_2024"
}
}
```
## Example Conversation Flow with Claude
1. **Initial Setup:**
```
Human: I'm working on a steel building design project. Can you help me set up a RAG project with relevant books?
Claude: I'll help you create a RAG project for steel building design. Let me start by searching for relevant books in your Calibre library.
[Uses search tool to find structural steel books]
Now let me create a project for you and add the most relevant books.
[Uses create_project and add_books_to_project tools]
```
2. **Technical Questions:**
```
Human: What are the AISC requirements for lateral buckling in steel beams?
Claude: Let me search your project context for information about lateral buckling requirements.
[Uses search_project_context tool]
Based on the relevant sections from your steel design references:
[Provides detailed answer with context from project books]
```
3. **Complex Analysis:**
```
Human: I need to design a moment frame for seismic loads. What should I consider?
Claude: [Uses search_project_context for "seismic moment frame design"]
Based on your project references, here are the key considerations for seismic moment frame design:
[Detailed response based on retrieved context]
```
## Tips for Effective RAG Usage
### 1. Book Selection
- Choose books that complement each other (codes + handbooks + examples)
- Include both theoretical and practical references
- Ensure books cover the specific domain (steel, concrete, geotechnical, etc.)
### 2. Query Formulation
- Use specific technical terminology
- Include relevant standards/codes (AISC, ACI, ASCE)
- Combine multiple concepts ("steel beam lateral buckling AISC")
### 3. Project Organization
- Create focused projects (don't mix unrelated topics)
- Use descriptive project names and descriptions
- Regularly review and update book selections
### 4. Context Interpretation
- Check similarity scores (higher = more relevant)
- Review multiple chunks for complete understanding
- Cross-reference with original sources when needed
## Advanced Usage Patterns
### 1. Multi-Project Comparison
```json
// Search steel design project
{
"tool": "search_project_context",
"arguments": {
"project_name": "steel_building_2024",
"query": "connection design bolted welded",
"limit": 3
}
}
// Search general structural project
{
"tool": "search_project_context",
"arguments": {
"project_name": "general_structural_refs",
"query": "connection design bolted welded",
"limit": 3
}
}
```
### 2. Progressive Context Building
```json
// Start with broad query
{
"tool": "search_project_context",
"arguments": {
"project_name": "steel_building_2024",
"query": "beam design",
"limit": 5
}
}
// Refine based on results
{
"tool": "search_project_context",
"arguments": {
"project_name": "steel_building_2024",
"query": "beam design lateral torsional buckling",
"limit": 3
}
}
```
### 3. Standards-Focused Queries
```json
{
"tool": "search_project_context",
"arguments": {
"project_name": "steel_building_2024",
"query": "AISC 360 section F2 lateral buckling",
"limit": 2
}
}
```
## Troubleshooting Common Issues
### Low Similarity Scores
- Refine query terms
- Check if books contain relevant content
- Add more books to project
### No Results Found
- Verify project has processed books
- Check query spelling and terminology
- Try broader search terms
### Performance Issues
- Limit chunk count per query (limit parameter)
- Consider project size (large projects = slower search)
- Monitor vector file sizes
## Integration with Engineering Workflows
### Design Process Integration
1. **Planning Phase:** Create project, add reference books
2. **Design Phase:** Query specific requirements and methods
3. **Verification Phase:** Cross-check with code requirements
4. **Documentation Phase:** Extract relevant citations and references
### Code Compliance Checking
```json
{
"tool": "search_project_context",
"arguments": {
"project_name": "steel_building_2024",
"query": "AISC code requirements deflection limits",
"limit": 4
}
}
```
### Best Practices Research
```json
{
"tool": "search_project_context",
"arguments": {
"project_name": "steel_building_2024",
"query": "best practices steel connection detailing",
"limit": 5
}
}
```