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