Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.terrapinfinance.com/llms.txt

Use this file to discover all available pages before exploring further.

A prompt template is a saved prompt you can apply on demand to any entity. The same template you tune in a Deep Dive session can be run across every obligor in a watchlist via an assignment, or used to drive a Data Table.

Where templates live

The Prompts page (/munis/prompts) is the single home for template authoring. From there you can:
  • Browse templates authored by you or anyone in your organization.
  • Create new templates with Create Template.
  • Duplicate an existing template as a starting point.
  • Edit a template body and save a new version.
  • Delete templates you no longer need.

A template has three parts

  • Name: short and action-oriented (e.g. “Audited financials summary”, “Hospital DSCR extraction”). This is what appears in the /run-prompt menu and the assignment-form dropdown.
  • Body: the prompt text. Templates can contain plain text and substitution variables for the obligor name, CUSIP, or document set, which are rendered at run time.
  • Status / version history: every save creates a new version. You can revert or branch from any previous version, and the version applied by an assignment is recorded so historical events stay reproducible.

Where you can run a template

SurfaceHow
Deep DiveType / in the chat box, pick run-prompt, then the template. See Using prompts.
Watchlist assignmentAdd Assignment, Type: Prompt Template, then pick the template. See Assignments.
Data TablesTemplates authored under Data Tables drive a matrix extraction. See Data Tables.

Writing better prompts

For longer multi-document workflows (tear sheets, multi-year financial profiles, structured metric extractions), prompt quality is what determines whether the answer is usable. Most information can be fetched and produced; the model just needs to know what idiosyncrasies to take into account.

Be explicit about scope

State boundary conditions up front: what to include, what to exclude, what time period to cover. For example:
  • “Operating revenue and expenses for fiscal years 2022–2024, water/sewer enterprise only. Exclude general fund.”
  • “Direct debt only. Do not aggregate overlapping or indirect debt.”

Pin metric definitions

Generic terms like “DSCR”, “operating margin”, or “net position” mean different things across sectors and accounting frameworks. Spell out the definition you want:
  • “DSCR = (net revenues available for debt service) / (annual debt service), where net revenues exclude entrance fees.” (typical for charter schools)
  • “Use audited actuals over budgets or projections when both are available.”
  • “If multiple sectors are reported, prefer the enterprise fund matching the bond’s purpose.”

Specify the accounting framework

GASB vs FASB and audited vs unaudited matter. Don’t make the model guess. Say “Use GASB-reported figures from the audited financial statement. Fall back to unaudited interim only if the audited period is unavailable.”

Specify the output shape

Tell the agent the sections, order, and format you want (bullets, tables, prose paragraphs). Templates that pin down structure are easier to read and easier to compare across entities.
  • “Return a table with columns: Fiscal year, Operating revenue, Operating expenses, Net position, DSCR.”
  • “Round monetary values to the nearest USD thousand. Use null for missing years rather than dropping the row.”

Iterate on a single credit, then promote

Author drafts against one entity in Deep Dive until the output is right, then mark the template as accepted so the rest of the org can use it. Much cheaper than tuning blindly across a whole watchlist.

Keep templates idempotent

Re-running the same template on the same entity should give substantively the same answer. If a template flips wildly between runs, it usually needs tighter scope or definitions.

Sharing across the organization

Once a template is accepted, everyone in your org can run it from Deep Dive and use it in assignments. Drafts stay visible only to their author until they’re explicitly promoted.