Arcana.Loop.SystemPrompt (Arcana v2.0.1)

Copy Markdown View Source

Default system prompt for Arcana.Loop.

The prompt follows current best practices from Anthropic's tool use guidance, OpenAI's GPT-5 prompting guide, and the Self-RAG / CRAG literature:

  1. Structured into named markdown sections (works across providers).
  2. Heavy detail in tool descriptions, not the system prompt.
  3. Explicit when-NOT-to-call rules to avoid over-eager tool use.
  4. Tool budget is mentioned even though max_iterations enforces it.
  5. No Thought:/Action: prefixes since native tool calling drives the loop.
  6. Self-critique on retrieval quality before answering.
  7. Soft language, not aggressive CRITICAL/MUST (these cause over-trigger).

Override with the :system_prompt option on Arcana.Loop.run/2.

Summary

Functions

Returns the default system prompt for the loop.

Functions

default(opts \\ [])

@spec default(keyword()) :: String.t()

Returns the default system prompt for the loop.

Takes the loop options so the prompt can mention the configured :max_iterations budget.