Frontmatter
| id | 8417 |
| title | Refine RAG System Prompt for Identity & Accuracy |
| state | Closed |
| labels | enhancementai |
| assignees | tobiu |
| createdAt | Jan 8, 2026, 11:52 AM |
| updatedAt | Jan 8, 2026, 11:56 AM |
| githubUrl | https://github.com/neomjs/neo/issues/8417 |
| author | tobiu |
| commentsCount | 2 |
| parentIssue | null |
| subIssues | [] |
| subIssuesCompleted | 0 |
| subIssuesTotal | 0 |
| blockedBy | [] |
| blocking | [] |
| closedAt | Jan 8, 2026, 11:56 AM |
Refine RAG System Prompt for Identity & Accuracy
tobiu assigned to @tobiu on Jan 8, 2026, 11:54 AM

tobiu
Jan 8, 2026, 11:54 AM
Input from Gemini 3 Pro:
✦ Refined the system prompt in
SearchService.mjsto strictly enforce "Neo.mjs" terminology. Verified withtest_rag.mjsthat the model now correctly refers to the framework as "Neo.mjs" instead of "Neo.js".

tobiu
Jan 8, 2026, 11:55 AM
╭─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ ✓ Shell node ai/examples/test_rag.mjs [current working directory /Users/Shared/github/neomjs/neo] │
│ │
│ 🔍 Testing RAG Service... │
│ ⏳ Waiting for service to be ready... │
│ [2026-01-08T10:53:58.222Z] [INFO] Connected to Neural Link Bridge as agent-733af1cc-39e9-4332-ae98-4a173ad16b02 │
│ ✅ Service Ready │
│ │
│ ❓ Asking: "How do I use the Viewport component?" │
│ │
│ 📝 Answer: │
│ To use the Viewport component, you import it and then assign it as the `mainView` configuration property when initializing a Neo.mjs application. │
│ │
│ For example, as seen in `DOCUMENT 1 (examples/component/helix/app.mjs)`, `DOCUMENT 2 (examples/component/multiWindowHelix/childapp/app.mjs)`, and `DOCUMENT 3 │
│ (examples/component/coronaGallery/app.mjs)`: │
│ │
│ 1. **Import the Viewport component:** │
│ `import Viewport from './Viewport.mjs';` │
│ 2. **Assign it as the `mainView` in `Neo.app()`:** │
│ `export const onStart = () => Neo.app({ mainView: Viewport, name: '...' });` │
│ │
│ This sets the Viewport as the primary view for your Neo.mjs application. │
│ │
│ 📚 References: │
│ 1. [0.4748] examples/component/helix/app.mjs - [Module Context] (examples/component/helix/app.mjs) │
│ 2. [0.5043] examples/component/multiWindowHelix/childapp/app.mjs - [Module Context] (examples/component/multiWindowHelix/childapp/app.mjs) │
│ 3. [0.5060] examples/component/coronaGallery/app.mjs - [Module Context] (examples/component/coronaGallery/app.mjs) │
╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
tobiu closed this issue on Jan 8, 2026, 11:56 AM
The current RAG prompt allows the model to slip into generic training data, referring to the framework as "Neo.js" instead of "Neo.mjs". We need to harden the system prompt in
SearchService.mjs:test_rag.mjs.