Skip to content

Added Edge ai features#352

Open
sam22ridhi wants to merge 1 commit intom2b3:sureshDevfrom
sam22ridhi:sureshDev
Open

Added Edge ai features#352
sam22ridhi wants to merge 1 commit intom2b3:sureshDevfrom
sam22ridhi:sureshDev

Conversation

@sam22ridhi
Copy link
Copy Markdown

Title:
add edge ai assistant (transformers.js) with sidebar, rag, and insights

Description:
this PR adds an AI sidebar that runs fully in the browser using transformers.js, so users can interact with article content without any backend calls.

what’s added:

  • sidebar with multiple tabs: chat, rag, summary, concepts, critique
  • on-device chat using quantized qwen1.5-0.5b (via wasm)
  • rag pipeline: chunking + embeddings (minilm) + cosine similarity retrieval
  • source snippets shown with rag responses
  • quick summary (5-point) generation
  • key concept extraction with short definitions
  • basic academic-style critique (strengths, weaknesses, questions)
  • lazy loading + caching of models for better performance

notes:
everything runs locally, so it’s faster and keeps user data on-device. also sets up a base for future stuff like personalization.

Screenshots (if any):
sidebar UI, rag responses with sources, summary/concepts outputs

Screenshot 2026-03-29 at 6 22 52 PM Screenshot 2026-03-29 at 6 22 13 PM Screenshot 2026-03-29 at 6 22 24 PM

this is mostly a poc to explore edge ai capabilities in the browser and make it accessible regardless of device constraints by using small models. for now it uses lightweight transformers.js models for simplicity, but in the future this can be extended to support stronger local models (e.g. via ollama in the backend) for better performance and accuracy.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant