Skip to content

ragieai/promptie

Repository files navigation

Promptie

A tool for testing prompts and generations with Ragie. This is a Next.js application that allows you to experiment with AI text generation using the Ragie knowledge retrieval system and Anthropic's Claude AI.

image image image

Features

  • Interactive prompt testing interface
  • System prompt customization
  • Knowledge retrieval with Ragie
  • Response generation with Anthropic AI or OpenRouter
  • Citation support for retrieved information
  • Configurable parameters (partition, topK, rerank)
  • Configurable LLM provider (Anthropic or OpenRouter)

Prerequisites

  • Node.js 18.x or higher
  • npm or yarn
  • Ragie API key (Get one at https://secure.ragie.ai)
  • Anthropic API key (if using Anthropic as the LLM provider)
  • OpenRouter API key (if using OpenRouter as the LLM provider, get one at https://openrouter.ai/)

Installation

  1. Clone the repository
git clone https://github.com/yourusername/promptie.git
cd promptie
  1. Install dependencies
npm install
# or
yarn install
  1. Set up environment variables

    • Create a .env file in the root directory by copying .env.example.
    • Add your API keys and configure the LLM provider as shown below. Refer to the comments in the .env.example file for more details.
    # Your Ragie API key (Get one at https://secure.ragie.ai)
    RAGIE_API_KEY=your_ragie_api_key_here
    
    # ANTHROPIC_API_KEY: Your Anthropic API key.
    # Get one from https://www.anthropic.com/
    ANTHROPIC_API_KEY=your_anthropic_api_key_here
    
    # OPENROUTER_API_KEY: Your OpenRouter API key.
    # Get one from https://openrouter.ai/
    OPENROUTER_API_KEY=your_openrouter_api_key_here
    # required for the frontend to detect OpenRouter support and show relevant UI:
    NEXT_PUBLIC_OPENROUTER_API_KEY=$OPENROUTER_API_KEY

Development

Start the development server:

npm run dev
# or
yarn dev

The application will be available at http://localhost:3000.

Usage

  1. Enter your message in the input field
  2. Configure parameters as needed:
    • Partition: Set knowledge partition (default: "default")
    • Top K: Number of results to retrieve (default: 6)
    • Rerank: Toggle to enable/disable result reranking
  3. Click "Send" to generate a response
  4. View the generated text and citations

Building for Production

Build the application for production:

npm run build
# or
yarn build

Start the production server:

npm run start
# or
yarn start

Technologies

License

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

About

A tool for testing prompts and generations with Ragie.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •