Testing Guide - RAG Knowledge Base
🧪 How to Test the RAG Tools
Now that the RAG tools are integrated into the Ask and Architect modes, you can test them by following these steps:
1. Install the Updated Version
- Close VS Code
- Uninstall the previous version of Reasoning (if any)
- Install the new version:
ai-cockpit-reasoning-3.0.0-pre.1.vsix - Open VS Code
2. Check if RAG is Initialized
- Open the VS Code developer console (F12)
- Look for this message in the console:
RAG Knowledge Base Manager started
3. Test in Ask Mode
- Open Reasoning
- Switch to "Ask" mode (important!)
- Test the following commands:
Test 1: Add Knowledge
Add to the knowledge base: "React is a JavaScript library for building user interfaces. It was developed by Facebook and allows creating reusable components."
Expected result: Reasoning should use the add_rag_knowledge tool and confirm that the item was added.
Test 2: Search Knowledge
Search the knowledge base for information about React
Expected result: Reasoning should use the search_rag_knowledge tool and return the item that was added.
Test 3: List Knowledge
List all items from the knowledge base
Expected result: Reasoning should use the list_rag_knowledge tool and show all items.
Test 4: Get Statistics
Show the knowledge base statistics
Expected result: Reasoning should use the get_rag_stats tool and display statistics.
4. Test in Architect Mode
- Switch to "Architect" mode
- Test the same command:
Add to the knowledge base: "TypeScript is a superset of JavaScript that adds static typing. It was developed by Microsoft."
5. Verify it doesn't work in other modes
- Switch to "Code" mode
- Try the same command:
Add to the knowledge base: "Test"
Expected result: Reasoning should create an MD file in the project (old behavior), as the "Code" mode does not have access to RAG tools.
6. Check the Saved Data
The data is saved in:
- macOS:
~/Library/Application Support/Code/User/globalStorage/roo-code.ai-cockpit-reasoning/knowledge-base/knowledge-base.json
Check if the file was created and contains the added data.
7. Troubleshooting
If the tools do not appear:
- Make sure you are in "Ask" or "Architect" mode
- Check the console for errors
- Restart VS Code
If RAG does not initialize:
- Check the console for the "RAG Knowledge Base Manager started" message
- If it doesn't appear, there might be an initialization error
If data does not persist:
- Check the permissions of the data directory
- Check for available disk space
8. Real-World Usage Examples
Add Project Documentation:
Add to the knowledge base: "This project uses React 18 with TypeScript. The folder structure follows the src/components, src/hooks, src/utils pattern. Global state is managed with Zustand."
Add Code Snippets:
Add to the knowledge base: "To create a custom hook in React: const useCustomHook = () => { const [state, setState] = useState(); return { state, setState }; };"
Search for Solutions:
Search the knowledge base for solutions to state issues in React