Ragex.RAG.PromptTemplate (Ragex v0.11.0)

View Source

Manages prompt engineering templates.

Supports both text and structured JSON prompt formats. When :response_format is :json, templates instruct the model to consume JSON context and produce JSON output.

Summary

Functions

Render a prompt template.

Functions

render(atom, vars)

Render a prompt template.

Parameters

  • template - Template name (:query, :explain, :suggest)
  • vars - Map with template variables

Template Variables

  • :system_prompt - System instructions
  • :context - Retrieved code context (string)
  • :query - User query
  • :response_format - Optional, :json for structured output