Thanks to visit codestin.com
Credit goes to github.com

Skip to content

deus-h/ragnite-ts

Repository files navigation

🔮 RAGNITE-TS ⚡

Next-Generation Retrieval-Augmented Generation in TypeScript

"As above, so below; as within, so without. The microcosm reflects the macrocosm."

RAGNITE-TS is a modern, TypeScript-based implementation of Retrieval-Augmented Generation (RAG) technologies. By fusing advanced retrieval methodologies with state-of-the-art LLMs through a type-safe, modular architecture, RAGNITE-TS empowers developers to create sophisticated AI applications that deliver extraordinary results across any domain.

TypeScript 5.4+ Next.js 15 pnpm MIT License Status: Active Development

🌠 Overview

Retrieval-Augmented Generation represents the alchemical fusion of retrieval-based knowledge with generative power. RAGNITE-TS transforms this technology using modern TypeScript and Next.js 15, providing a comprehensive suite of tools, frameworks, and pre-built solutions that enable rapid deployment of enterprise-grade RAG systems.

Whether you're building knowledge management systems, customer support solutions, content creation tools, or specialized domain applications, RAGNITE-TS provides the building blocks and patterns to manifest your vision with type safety and scalability at its core.

🔮 Key Features

  • Type-Safe Architecture: Built with TypeScript for robust, error-resistant code
  • Modern Framework: Leverages Next.js 15 with React Server Components for optimal performance
  • Monorepo Structure: Organized with pnpm workspaces for efficient code sharing and maintenance
  • LLM Provider Flexibility: Support for OpenAI, Anthropic, xAI, Google AI, Mistral, and more
  • Vector Store Diversity: Integrations with FAISS, Pinecone, ChromaDB, Qdrant, PostgreSQL/pgvector, and others
  • Advanced RAG Techniques: Implements multi-query retrieval, self-RAG, hypothetical document embeddings, and more
  • Streaming Responses: Real-time AI responses with Vercel AI SDK integration
  • Production-Ready: Built with scalability, performance, and reliability in mind

🔥 Implementation Progress

The project is actively under development, with significant progress in core areas:

Completed

  • ✅ Project structure setup with pnpm workspaces and Turborepo
  • ✅ Core package with document types, vector store interfaces, and utility functions
  • ✅ Document ingest pipeline including loaders, splitters, and embedding generators
  • ✅ Basic vector store integrations (in-memory, FAISS, Qdrant)
  • ✅ Next.js 15 application with Tailwind CSS and Shadcn/UI
  • ✅ Chat interface with streaming response support
  • ✅ File upload and document management UI
  • ✅ OpenAI integration for embeddings and chat completions

In Progress

  • 🔄 API routes for RAG operations
  • 🔄 Advanced RAG techniques implementation
  • 🔄 Additional vector store and LLM provider integrations

See PROGRESS.md for detailed status information.

🧙‍♂️ Project Structure

RAGNITE-TS follows a monorepo architecture using pnpm workspaces:

ragnite-ts/
├── apps/                    # Applications
│   ├── web/                 # Next.js 15 web application
│   └── api/                 # Optional standalone API server
├── packages/                # Shared packages
│   ├── core/                # Core RAG implementation
│   ├── advanced/            # Advanced RAG techniques
│   ├── ui/                  # Shared UI components
│   └── schemas/             # TypeScript type definitions
├── examples/                # Example implementations
├── tools/                   # CLI tools and utilities
└── docs/                    # Documentation

💫 Getting Started

Prerequisites

  • Node.js 20.x or higher
  • pnpm 9.x or higher

Installation

# Clone the repository
git clone https://github.com/yourusername/ragnite-ts.git
cd ragnite-ts

# Install dependencies
pnpm install

# Start development server
pnpm dev

Configuration

Create a .env.local file in the apps/web directory with your API keys:

# LLM Providers
OPENAI_API_KEY=your_openai_api_key
ANTHROPIC_API_KEY=your_anthropic_api_key
# Add other provider keys as needed

# Vector Stores
PINECONE_API_KEY=your_pinecone_api_key
PINECONE_ENVIRONMENT=your_pinecone_environment
# Add other vector store configurations as needed

🔧 Core Technologies

RAGNITE-TS leverages a modern tech stack:

Technology Version Purpose
TypeScript 5.4.x Type-safe development
Next.js 15.2.x Frontend framework with React Server Components
pnpm 9.x Package management with workspaces
LangChain.js 0.2.x RAG orchestration framework
LangGraph.js Latest Orchestration framework for advanced agents and workflows
React 19.x UI component library
Shadcn/UI Latest Component library based on Tailwind CSS
Tailwind CSS 4.x Utility-first CSS framework
Vercel AI SDK Latest Streaming UI components
Turborepo Latest Build system for monorepos
zod Latest TypeScript-first schema validation
Node.js 20.x Runtime environment

🌟 Use Cases

RAGNITE-TS can be applied to transform numerous domains:

  • Enterprise Knowledge Management: Create systems that make organizational knowledge accessible and actionable
  • Customer Support: Build systems that provide accurate, contextual responses to user inquiries
  • Content Creation: Develop tools that assist in writing, research, and content generation with factual accuracy
  • Code Assistance: Implement coding assistants that leverage your codebase and best practices
  • Research & Analysis: Build research assistants and knowledge synthesis tools

🔬 Advanced RAG Techniques

RAGNITE-TS implements cutting-edge RAG techniques:

  • Multi-Query Retrieval: Generate multiple query variations to improve document retrieval coverage
  • Hypothetical Document Embeddings: Use LLMs to create embeddings for ideal documents
  • Self-RAG with Evaluation: Self-evaluate retrieved documents for relevance before generation
  • Chain-of-Thought Reasoning: Apply step-by-step reasoning for more accurate responses
  • Parent Document Retrieval: Retrieve full documents based on relevant chunks
  • Contextual Compression: Compress retrieved documents to focus on query-relevant information

📖 Documentation

Comprehensive documentation is available in the docs/ directory:

🤝 Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

📄 License

This project is licensed under the MIT License - see the LICENSE file for details.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published