LearnNewsExamplesServices
Frontmatter
id8220
titleAI: Implement Knowledge Base Upload Script
stateClosed
labels
enhancementai
assigneestobiu
createdAtDec 30, 2025, 4:41 PM
updatedAtDec 30, 2025, 4:50 PM
githubUrlhttps://github.com/neomjs/neo/issues/8220
authortobiu
commentsCount1
parentIssuenull
subIssues[]
subIssuesCompleted0
subIssuesTotal0
blockedBy[]
blocking[]
closedAtDec 30, 2025, 4:50 PM

AI: Implement Knowledge Base Upload Script

Closed v11.18.0 enhancementai
tobiu
tobiu commented on Dec 30, 2025, 4:41 PM

Context: The migration to gemini-embedding-001 has significantly increased the time required for initial Knowledge Base synchronization (~75 mins due to rate limits). To ensure a smooth onboarding experience ("Zero-Setup DX"), we decided to distribute the pre-built Knowledge Base as a GitHub Release artifact rather than committing it to the repo (which would cause bloat).

Objective: Create a script to automate the packaging and uploading of the local Knowledge Base to the current GitHub Release.

Tasks:

  1. Create Script: ai/examples/upload_knowledge_base.mjs
    • Zip: Compress the chroma-neo-knowledge-base directory into chroma-neo-knowledge-base.zip.
    • Upload: Use the GitHub CLI (gh) to upload the zip to the release tag matching the version in package.json.
    • Command: gh release upload v${version} chroma-neo-knowledge-base.zip --clobber
  2. Add NPM Script: Add "ai:upload-kb": "node ./ai/examples/upload_knowledge_base.mjs" to package.json.
  3. Verification: Execute the script to upload the current Knowledge Base to the existing v11.17.1 release.

Prerequisites:

  • User must have gh (GitHub CLI) installed and authenticated.
  • User must have a fully synced chroma-neo-knowledge-base locally.
tobiu added the enhancement label on Dec 30, 2025, 4:41 PM
tobiu added the ai label on Dec 30, 2025, 4:41 PM
tobiu assigned to @tobiu on Dec 30, 2025, 4:45 PM
tobiu referenced in commit f1286e9 - "AI: Implement Knowledge Base Upload Script #8220" on Dec 30, 2025, 4:49 PM
tobiu
tobiu Dec 30, 2025, 4:49 PM

Input from Gemini 2.5 pro:

Zero-Setup DX Implementation Complete

The Knowledge Base distribution workflow is now operational.

Artifact:

  • Uploaded chroma-neo-knowledge-base.zip (92.53 MB) to Release 11.17.1.
  • Link: https://github.com/neomjs/neo/releases/download/11.17.1/chroma-neo-knowledge-base.zip

Scripts:

  • Upload: npm run ai:upload-kb (zips and uploads to GH Releases matching package version).
  • Download: npm run ai:download-kb (fetches and unzips).
  • Auto-Setup: prepare script in package.json runs the download automatically for repo contributors.

Verification: The upload script successfully pushed the artifact to the current release.

Ready for merge.

tobiu closed this issue on Dec 30, 2025, 4:50 PM