Skip to content

Conversation

@TimPietruskyRunPod
Copy link
Collaborator

Summary

Adds a RAG (Retrieval Augmented Generation) agent that answers questions about Runpod documentation using semantic search over vector embeddings.

Changes

  • New agent: docs-rag-agent.ts using createVectorQueryTool from @mastra/rag
  • Ingestion script: scripts/ingest-docs.ts clones runpod/docs, chunks markdown, generates embeddings
  • Vector store: LibSQL with automatic network volume detection for persistence
  • Dependencies: Added @mastra/rag, ai, simple-git, tiktoken
  • Documentation: Updated README with setup instructions and architecture

How It Works

  1. Run ingestion: OPENAI_API_KEY=xxx npx tsx scripts/ingest-docs.ts
  2. Query the agent via API

Persistence

  • With network volume: Vector DB stored at /runpod-volume/vector.db
  • Without: Stored locally, needs re-ingestion after cold starts

Testing

Tested locally with Docker - agent successfully answers questions about serverless, pods, network volumes, and handlers.

Closes CSE-787

Copy link

@max4c max4c left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@TimPietruskyRunPod TimPietruskyRunPod force-pushed the timpietrusky/cse-787-agent-rag-docs-assistant branch from 7f8165c to c65ab47 Compare December 22, 2025 10:10
- Add docs-rag-agent using createVectorQueryTool from @mastra/rag
- Add ingestion script to clone runpod/docs and generate embeddings
- Use LibSQL vector store with network volume support for persistence
- Add @mastra/rag, ai, simple-git, tiktoken dependencies
- Update README with RAG agent documentation and setup instructions
- Vector DB auto-detects /runpod-volume for persistent storage

Closes CSE-787
@TimPietruskyRunPod TimPietruskyRunPod force-pushed the timpietrusky/cse-787-agent-rag-docs-assistant branch from c65ab47 to c634f2a Compare December 22, 2025 10:14
@TimPietruskyRunPod TimPietruskyRunPod merged commit 364c280 into main Dec 22, 2025
1 check passed
@TimPietruskyRunPod TimPietruskyRunPod deleted the timpietrusky/cse-787-agent-rag-docs-assistant branch December 22, 2025 10:16
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.

3 participants