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.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.
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-promptmenu 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
| Surface | How |
|---|---|
| Deep Dive | Type / in the chat box, pick run-prompt, then the template. See Using prompts. |
| Watchlist assignment | Add Assignment, Type: Prompt Template, then pick the template. See Assignments. |
| Data Tables | Templates 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.”
