glider-docs-copilot

Local-first Glider IDE docs copilot built with Next.js and semantic search

0
0
0
TypeScript
public

Glider Docs Copilot

Glider Docs Copilot is a local-first documentation assistant for the Glider IDE GitBook.

Instead of wiring a hosted chatbot to docs, this project builds a searchable local knowledge base from the Glider documentation and lets users ask natural-language questions against it through a simple chat interface.

What It Does

  • Scrapes and normalizes the glider-ide GitBook into a local dataset.
  • Splits documentation into semantic chunks for better retrieval.
  • Generates local vector embeddings for every chunk.
  • Embeds the user query in the browser.
  • Returns the most relevant documentation sections with source links.
  • Runs without a server-side LLM answer pipeline.

The result is closer to “talk to docs with grounded retrieval” than a generic AI chatbot.

Why Xenova Matters Here

This project relies on the Xenova/Hugging Face browser model:

  • Model: Xenova/all-MiniLM-L6-v2
  • Runtime package: @browser-ai/transformers-js

That model powers the semantic search layer in two places:

  1. Offline indexing

  2. Runtime query understanding

    • When a user asks a question, the app generates a local embedding for the query in the browser and compares it against the stored vectors.

Why this is useful

  • No OpenAI or hosted embedding API is required for search.
  • First-party docs stay local to the app flow.
  • Search works by meaning, not only exact keyword matches.
  • The model is cached after first load, so repeated use is smoother.
  • It is especially good at mapping natural questions to related technical documentation sections.

What Xenova is not doing here

  • It is not generating long-form answers with a remote LLM.
  • It is not calling a cloud inference endpoint.
  • It is not replacing the docs source of truth.

Its role is retrieval: turning both docs and user questions into vectors so the app can find the right documentation quickly and locally.

Architecture

Data pipeline

App runtime

Local Development

Install dependencies:

npm install

Start the app:

npm run dev

Open:

http://localhost:3000

Rebuilding the Docs Index

If the Glider GitBook changes, rebuild the local corpus:

npm run build-data

That runs:

npm run scrape-docs
npm run generate-embeddings

Production

This project is deployed on Vercel:

Current Tradeoffs

  • Retrieval is semantic-only right now; hybrid keyword + semantic search would improve exact API lookups.
  • Answer synthesis is intentionally lightweight and grounded in retrieved chunks.
  • The first load can be slower because the local embedding model needs to warm up and cache.

Good Next Steps

  • Add hybrid retrieval for exact method names and symbols.
  • Add reranking on top of the Xenova recall layer.
  • Add metadata-aware boosting for api/ pages versus tutorial pages.
  • Add tighter chunking for code-heavy API entries.
v0.3.3[beta]