A Chrome extension for question-answer over websites
Site RAG Extension
[Demo video](https://www.loom.com/share/2ee8496a17774577b2684d6b2981bd1a)

A Chrome extension for asking questions over websites. Site RAG can index a single page of the website, or crawl the entire site. It then generates embeddings for the indexed documents, and stores them in a vector store database.
When a user asks a question, Site RAG will either fetch relevant documents from the current page, or the entire site (customizable).
## Requirements
- [Anthropic API key](https://console.anthropic.com/) - For LLM chat generations
- [OpenAI API key](https://platform.openai.com/) - For embeddings
- [Supabase account](https://supabase.com/) - For vector store
## Setup
First, clone the repository:
```bash
git clone https://github.com/bracesproul/site-rag.git
```
```bash
cd site-rag
```
Then, install the dependencies:
```bash
yarn install
```
and build:
```bash
yarn build
```
### Vector store
To setup the vector store, you need to create a Supabase database. Then, inside the SQL editor, run the following:
```sql
-- Enable the pgvector extension to work with embedding vectors
create extension vector;
-- Create a table to store your documents
create table documents (
id bigserial primary key,
content text, -- corresponds to Document.pageContent
metadata jsonb, -- corresponds to Document.metadata
embedding vector(3072) -- 3072 works for OpenAI embeddings, change if needed
);
-- Create a function to search for documents
create function match_documents (
query_embedding vector(3072),
match_count int DEFAULT null,
filter jsonb DEFAULT '{}'
) returns table (
id bigint,
content text,
metadata jsonb,
embedding jsonb,
similarity float
)
language plpgsql
as $$
#variable_conflict use_column
begin
return query
select
id,
content,
metadata,
(embedding::text)::jsonb as embedding,
1 - (documents.embedding <=> query_embedding) as similarity
from documents
where metadata @> filter
order by documents.embedding <=> query_embedding
limit match_count;
end;
$$;
```
## Usage
To use the extension, go to [chrome://extensions/](chrome://extensions/) and click \"Load unpacked\". From there, select the `dist` directory of this repository.
Once loaded, open the extension and visit the settings page. Here you can add your API keys, and Supabase credentials. You can also customize the indexing settings, such as chunk size and overlap.
Source Manifest.json
Similar Extensions
Page Assist - A Web UI for Local AI Models 54 73 ★ 2.79MiB
open-os LLM Browser Extension 54 2 ★ 4.25MiB
ResponseTime Monitor 54 19 ★ 49.63KiB
AnythingLLM Browser Companion 54 4 ★ 81.12KiB
Receptor 54 0 ★ 1.59MiB
Prompt Genie: Grammarly but for prompts 54 42 ★ 822KiB
Anything Copilot - A more powerful sidebar, split-screen, and AI assistant 54 54 ★ 2.3MiB
Barra/AI 54 9 ★ 717KiB
MarkDownload - Markdown Web Clipper 54 146 ★ 403KiB
trudl 54 2 ★ 9.1MiB
Human Reader, powered by ElevenLabs 54 27 ★ 1.03MiB
ChatGPTBox 54 104 ★ 1.91MiB
Google Meet Transcripts & AI Summary 54 195 ★ 389KiB
supermemory 54 36 ★ 876KiB
Page Sidebar | Open any page in side panel 54 39 ★ 379KiB
Perplexity AI for Google 54 0 ★ 189KiB

Palo Alto library search (v2) 54 1 ★ 15.25KiB
Velocity 54 0 ★ 3.13MiB
Fueler.daily - portfolio inspiration ideas 54 7 ★ 6.02MiB
Power Apps Tools 54 1 ★ 4.61MiB
Bato 54 3 ★ 375KiB
Notion Slides by Wunderpresentation 54 31 ★ 21.03KiB
Devgen - Your Code Research Assistant 54 3 ★ 905KiB
Coframe 54 7 ★ 968KiB