-
Notifications
You must be signed in to change notification settings - Fork 1
Prompts
Cristiano Carvalho edited this page Apr 2, 2026
·
6 revisions
Templates with variable interpolation executed across multiple LLM providers.
- name - String identifier
- description - Purpose
-
template - Text with
{{variables}} - tags - Array of strings (optional)
- project_id - Foreign key (optional)
Aludel.Prompts.create_prompt(%{
name: "Code Reviewer",
template: "Review this {{language}} code:\n\n{{code}}",
tags: ["code-review", "security"]
}){{variable_name}} - Alphanumeric and underscores only, case-sensitive.
Valid: {{article}}, {{user_input}}, {{item1}}
Invalid: {{user input}}, {{user-input}}
Variables extracted automatically:
Aludel.Prompts.extract_variables("Translate {{text}} to {{language}}")
# => ["text", "language"]Provide variable values as map:
%{"text" => "Hello", "language" => "Spanish"}
# Result: "Translate Hello to Spanish"Edits create immutable versions automatically. Each update_prompt/2 creates new PromptVersion row.
Version comparison available in Evolution tab:
- Success rate by version
- Latency/cost trends
- Test suite performance
# Tags
tags: ["summarization", "articles"]
Aludel.Prompts.list_prompts_by_tag("summarization")
# Projects (grouping)
{:ok, project} = Aludel.Prompts.create_project(%{name: "Marketing"})
Aludel.Prompts.create_prompt(%{project_id: project.id, ...})# CRUD
create_prompt(attrs)
update_prompt(prompt, attrs) # Creates new version
delete_prompt(prompt)
get_prompt!(id)
list_prompts()
# Versioning
list_versions(prompt)
get_version!(id)
revert_to_version(prompt, version_id)
# Variables
extract_variables(template)- Prompts
- Providers
- Runs and Execution
- Evaluation Suites
- Regex Assertions
- Metric Context
- Evaluator Execution Details
- Rubric Judges
- Judge Catalog
- Repeated Sampling
- Quality Policies
- ExUnit Evaluations
- File-Based Suites
- Evaluation Reporters
- Datasets
- Red-Team Datasets
- Generated Red-Team Cases
- Analytics and Prompt Evolution
- Exports and CI
- Documents and Storage
- Embedding and Access