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.
- 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)
- 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/)
- Clone the repository
git clone https://github.com/yourusername/promptie.git
cd promptie- Install dependencies
npm install
# or
yarn install-
Set up environment variables
- Create a
.envfile 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.examplefile 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
- Create a
Start the development server:
npm run dev
# or
yarn devThe application will be available at http://localhost:3000.
- Enter your message in the input field
- 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
- Click "Send" to generate a response
- View the generated text and citations
Build the application for production:
npm run build
# or
yarn buildStart the production server:
npm run start
# or
yarn start- Next.js - React framework
- LLM Providers:
- Anthropic Claude - AI assistant
- OpenRouter - Access various LLMs via a single API
- Ragie - Knowledge retrieval system
- Tailwind CSS - Utility-first CSS framework
- TypeScript - Type safety
This project is licensed under the MIT License - see the LICENSE file for details.