Prompts
Save and organize prompts for your RAG agents.
Overview
Prompts allow you to save reusable query templates that you can use with your agents. Instead of typing the same complex queries repeatedly, create a prompt once and use it whenever needed.
Key features:
- Variable placeholders: Use
{{variable}}syntax for dynamic content - Organization: Group prompts into folders
- Favorites: Mark frequently used prompts for quick access
- Scope: Apply to entire workspace or specific datastores
Creating Prompts
Using the Dashboard
- Navigate to Prompts in the sidebar
- Click Create Prompt
- Fill in the prompt details:
- Title: A descriptive name
- Description: What this prompt is for (optional)
- Content: The prompt template
- Choose the scope (workspace or datastore)
- Click Create
Using the API
1const prompt = await client.prompts.create({2 title: 'Contract Risk Assessment',3 description: 'Analyze a contract for potential risks',4 content: `Analyze the following contract for {{company_name}} and identify:51. Liability risks62. Termination clauses73. Payment terms84. Unusual provisions910Contract type: {{contract_type}}11Focus areas: {{focus_areas}}`,12});Variable Syntax
Use double curly braces to define variables in your prompts:
Summarize the {{document_type}} for {{company_name}}.
Focus on:
- {{focus_area_1}}
- {{focus_area_2}}
Output format: {{output_format}}
Variable Extraction
When you use a prompt, Orka automatically extracts variables and prompts you to fill them in:
| Variable | Value |
|----------|-------|
| document_type | quarterly report |
| company_name | Acme Corp |
| focus_area_1 | revenue trends |
| focus_area_2 | risk factors |
| output_format | bullet points |
Default Values
You can provide default values using the pipe syntax:
Summarize the {{document_type|contract}} for {{company_name}}.
Output format: {{output_format|bullet points}}
Managing Prompts
Folders
Organize prompts into folders for easier navigation:
1// Create a folder2const folder = await client.prompts.createFolder({3 name: 'Legal Analysis',4});56// Create prompt in folder7const prompt = await client.prompts.create({8 title: 'Due Diligence Check',9 content: '...',10 folder_id: folder.id,11});Favorites
Mark prompts as favorites for quick access:
1await client.prompts.favorite('prompt_abc123');23// List favorites4const favorites = await client.prompts.list({5 favorites_only: true,6});Updating Prompts
1await client.prompts.update('prompt_abc123', {2 title: 'Updated Title',3 content: 'Updated content with {{new_variable}}',4});Deleting Prompts
1await client.prompts.delete('prompt_abc123');Using Prompts with Agents
In the Chat Interface
- Open the chat with your agent
- Click the Prompts button (or press
/) - Select a prompt from the list
- Fill in any variables
- Send the query
Via API
1// Use a prompt directly2const response = await client.chat.query({3 agent_id: 'agt_abc123',4 prompt_id: 'prompt_xyz789',5 variables: {6 company_name: 'Acme Corp',7 document_type: 'contract',8 },9});Scope
Workspace-level
Prompts available across your entire workspace:
1await client.prompts.create({2 title: 'General Summary',3 content: 'Summarize the key points of {{topic}}',4 // No datastore_id = workspace-level5});Datastore-specific
Prompts only available when querying a specific datastore:
1await client.prompts.create({2 title: 'Legal Contract Analysis',3 content: 'Analyze {{contract_name}} for compliance issues',4 datastore_id: 'ds_legal123',5});Best Practices
Writing Effective Prompts
- Be specific: Include clear instructions for the AI
- Use structure: Break complex prompts into numbered steps
- Include output format: Specify how you want results formatted
- Add context: Include relevant background when helpful
Example: Good Prompt
Analyze the {{document_type}} and provide:
1. **Executive Summary** (2-3 sentences)
2. **Key Findings** (bullet points)
3. **Risk Assessment** (High/Medium/Low with explanation)
4. **Recommended Actions** (numbered list)
Focus area: {{focus_area}}
Audience: {{audience|executive leadership}}
Example: Poor Prompt
Tell me about {{thing}}
Next Steps
- Creating Agents - Configure agents to use prompts
- Prompts API - Full API documentation
- Logic - Add domain knowledge for better results