Skip to content

ElenaViewSynthesis/TavilyRAG

Repository files navigation

Tavily RAG Dashboard

A Nuxt.js + TypeScript dashboard that accepts prompts, searches the web with Tavily, and returns Tavily's generated answer with source links.

Live Demo

Try the deployed dashboard at https://tavily-rag-dashboard-20260603.netlify.app/.

Tavily RAG Dashboard screenshot showing suggested prompts and Tavily web results

Suggested Prompts

Use the prompt chips to fetch real-time web data through Tavily:

  • What's the Nebius stock today?
  • Anthropic latest funding round
  • What are the latest npm vulnerabilities in agent plugins?

Setup

  1. Copy .env.example to .env and fill in the keys.
  2. Install JavaScript dependencies:
npm install
  1. Start the app:
npm run dev

Open http://localhost:3000.

For production builds:

npm run build
npm start

Netlify Deployment

This project includes netlify.toml with the Nuxt build settings:

  • Build command: npm run build
  • Publish directory: dist
  • Node version: 22

Set the required environment variables in Netlify under Site configuration -> Environment variables before deploying. Do not commit real API keys.

Required Environment

  • TAVILY_API_KEY: Tavily Search API key.
  • PINECONE_API_KEY: Pinecone API key.
  • PINECONE_HOST: Pinecone index host for an index with integrated embedding enabled.

Optional knobs include TAVILY_MAX_RESULTS, PINECONE_NAMESPACE, PINECONE_TEXT_FIELD, and PINECONE_API_VERSION.

Flow

  1. The Nitro API route searches Tavily for fresh web context.
  2. It stores every Tavily source in Pinecone, linked to the original user_query and a stable query_id.
  3. It returns Tavily's generated answer when one is available.
  4. If Tavily does not provide a direct answer, it returns a short fallback built from top source snippets.
  5. The API returns the answer and Tavily sources to the UI.

Pinecone Storage

The app uses Pinecone's integrated embedding upsert endpoint:

POST /records/namespaces/{namespace}/upsert

Each Tavily source is stored as a text record. The text field defaults to text, but you can change it with PINECONE_TEXT_FIELD to match your index field_map.

Each record includes metadata linking it back to the user prompt:

  • user_query
  • query_id
  • source_rank
  • source_title
  • source_url
  • source_type
  • queried_at

About

Fetch real-time data from web and store the sources/citations in Pinecone

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors