Skip to content

NeoSkillFactory/rag-query-optimizer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

rag-query-optimizer

Audit License OpenClaw

Automatically analyzes RAG pipeline retrieval results and generates optimized query refinement suggestions to improve answer relevance.

Description

rag-query-optimizer — Automatically analyzes RAG pipeline retrieval results and generates optimized query refinement suggestions to improve answer relevance.

Features

  • Analyze RAG pipeline retrieval results for relevance patterns and gaps
  • Detect low-relevance retrievals through statistical score analysis
  • Identify query-document semantic mismatches
  • Generate intelligent query refinement suggestions based on retrieval analysis
  • Suggest synonym expansions and contextual rewrites
  • Recommend query decomposition strategies for complex queries
  • Support multiple RAG pipeline configurations and retrieval strategies
  • Provide CLI interface for direct query optimization tasks
  • Integrate seamlessly with OpenClaw agent workflows
  • Handle errors gracefully with non-zero exit codes on failure

Usage

# Analyze a retrieval results file
node scripts/main.js analyze <results-file>

# Analyze with custom configuration
node scripts/main.js analyze <results-file> --config <config-file>

# Output as JSON
node scripts/main.js analyze <results-file> --format json

# Show help
node scripts/main.js --help

Examples

node scripts/main.js analyze results.json --format json


## 9. Error Handling

| Exit Code | Meaning |
|-----------|---------|
| 0 | Success — suggestions generated |
| 1 | General error — unexpected failure |
| 2 | Invalid input — malformed results file |
| 3 | Configuration error — invalid config |
| 4 | No results — empty retrieval data |

GitHub

Source code: github.com/NeoSkillFactory/rag-query-optimizer

License

MIT © NeoSkillFactory

About

Automatically analyzes RAG pipeline retrieval results and generates optimized query refinement suggestions to improve answer relevance.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors