FREE COURSE · 11 MODULES

AI Concepts & Orchestration

A Treasury Professional's Guide to the AI Ecosystem.

From Domain Expert to AI-Fluent Professional. This course has two parts: the AI concepts you must know (LLMs, fine-tuning, RAG, embeddings, agents, function calling), and AI orchestration (how to connect, control, and direct AI systems to do real work).

After this course, you will be able to
  • ✓ Explain what an LLM actually does, and why it's a tool, not an oracle
  • ✓ Tell fine-tuning, RAG, and embeddings apart — and know which one you need
  • ✓ Distinguish a chatbot from an AI agent, and know what function calling does
  • ✓ Read an API call, and write prompts that get you the output you actually want
  • ✓ Name the four agentic patterns and see how a full AI system's layers connect

treasuryease.com

Part 1

AI Concepts You Must Know

The building blocks that power every AI application.

Six concepts, in order: LLMs · Fine-Tuning · RAG · Embeddings & Vector Databases · AI Agents · Function Calling

What is an LLM?

Large Language Model

A neural network trained on massive text data that predicts the next word in a sequence. It doesn't "think" — it calculates the most probable continuation based on patterns learned from billions of documents.

Examples: Claude (Anthropic), GPT-4 (OpenAI), Llama (Meta), Mistral, Gemini (Google)

Treasury analogy

Think of an LLM like an extremely well-read treasury analyst who has studied every financial textbook, regulation, and report ever published. They can draft, analyze, and respond — but they can make confident mistakes because they're pattern-matching, not reasoning from first principles.

Key Insight: LLMs are tools, not oracles. Always validate outputs against your domain expertise.

What is Fine-Tuning?

Specializing a General Model

Base model

General purpose LLM. Knows everything broadly, nothing deeply in your domain.

Your data

Domain-specific examples: treasury reports, FX analyses, cash flow patterns, SWIFT messages.

Specialized

Understands treasury terminology, formats, and patterns. Better at your specific tasks.

Reality check

Cost: $10K–$100K+ in compute for meaningful fine-tuning

Data needed: Thousands of high-quality, domain-specific examples

Better alternative: Use a general model with great prompts + RAG (next module)

What is RAG?

Retrieval-Augmented Generation

1
User asks

"What's our EUR/USD exposure this quarter?"

2
System retrieves

Searches your documents, databases, reports for relevant context.

3
LLM generates

Combines retrieved data with its general knowledge to produce an accurate answer.

Why RAG is your best friend

Without RAG: the LLM guesses based on general training. It might hallucinate numbers, invent policies, or give outdated rates.

With RAG: the LLM answers using YOUR actual data — real bank balances, real FX positions, real policy documents. Grounded and verifiable.

Embeddings & Vector Databases

The Engine Behind RAG

Embeddings

An embedding converts text into a list of numbers (a vector) that captures its meaning.

"cash pooling structure"

→ [0.82, -0.14, 0.67, 0.31, ...]

"liquidity management setup"

→ [0.79, -0.11, 0.64, 0.28, ...]

Similar meaning = similar numbers!

Vector database

A database optimized for storing and searching embeddings. You search by meaning, not by exact keyword match.

Search: "How do we manage EUR exposure?"

Finds: FX hedging policy doc, Q3 exposure report, EUR/USD forward contracts memo

Even though none contained exact words!

Popular vector DBs: Pinecone, Weaviate, Chroma, pgvector (PostgreSQL extension)

What is an AI Agent?

From Answering Questions to Taking Actions

Basic chatbot

You ask → It answers → Done

Single turn, no memory of state, no ability to take action in the real world. Like asking a colleague a question in the hallway.

AI agent

You ask → It plans → It acts → It checks → It adjusts → Done

Multi-step reasoning. Can call tools, query databases, make decisions. Like a junior analyst who executes a full workflow autonomously.

You're already building this. TOSY in TreasuryOS is an AI agent: it receives a request, decides which Core to use (ReportCore, CalculatorCore, IntercompanyCore), executes the task, and delivers the result.

What is Function Calling?

Also Called: Tool Use

Function calling lets an LLM decide WHEN to use an external tool (API, database, calculator) and WHAT parameters to pass. The LLM doesn't execute the function itself — your code does. The LLM just structures the request.

Example: treasury workflow
1 User says:

"Show me all EUR payments due this week"

2 LLM decides:

Call get_payments() with currency=EUR, due_date=this_week

3 System runs:

Queries your database, returns payment list as structured data

4 LLM formats:

Presents results in a readable summary with totals & actions

Part 2

AI Orchestration

How to connect, control, and direct AI systems to do real work.

Five topics, in order: API Calls · Prompt Engineering · Agentic Patterns · How It All Connects · Your Learning Roadmap

API Calls — Talking to AI

How Your App Communicates with AI Models

An API (Application Programming Interface) is a structured way for software to talk to other software. When TreasuryOS sends a message to Claude, it's making an API call: sending a request with your prompt, and receiving a structured response back.

Simplified API call
response = claude.messages.create(
  model = "claude-sonnet-4",
  messages = ["role": "user",
    "content": "Analyze our Q3 cash"],
  tools = [get_balances, get_fx]
)
Key elements

Model: Which AI brain to use

Messages: The conversation history + your current request

System prompt: Instructions that define how the AI behaves

Tools: Functions the AI can call (databases, calculators, APIs)

Temperature: Creativity dial (0 = precise, 1 = creative)

Prompt Engineering

The Art of Telling AI Exactly What You Want

Weak prompt

"Analyze our cash position"

No context. No format. No time frame. No currencies. The AI will guess everything — and guess wrong.

Strong prompt

"You are a treasury analyst. Analyze cash positions for EUR, USD, GBP as of today. Output a table with bank, currency, balance, and flag any account below €50K."

Key techniques
Role Assignment

"You are a senior treasury analyst with 15 years experience"

Output Format

"Return results as a JSON object with these fields: ..."

Few-Shot Examples

Show 2-3 examples of input/output pairs you want

Chain of Thought

"Think step by step before giving your final answer"

Agentic Patterns

Architectures for AI Systems That Take Action

Router

AI reads the request and routes it to the right handler. No execution, just classification.

TOSY reads "forecast Q4 cash" → routes to ReportCore

Chain

Output of step 1 feeds into step 2. Linear pipeline. Each step transforms the data.

Parse MT940 → Categorize → Reconcile → Report

Tool-use loop

AI calls tools repeatedly until it has enough info. It decides what to call and when to stop.

Check balances → Check FX rates → Calculate exposure → Done

Reflection

AI generates output, then critiques its own output and improves it. Self-correction loop.

Draft board report → Review for gaps → Revise → Final

How It All Connects

A Complete AI-Powered Treasury System

User layer

Treasurer asks a question or triggers a workflow in the app

Orchestration layer

System prompt + prompt engineering + agentic pattern (router/chain/loop) decides how to proceed

LLM layer

Claude/GPT processes the request, decides which tools to call via function calling

Tool layer

API calls execute: query database, call bank APIs, run calculations, fetch FX rates

Data layer

RAG retrieves context from vector DB (policies, history). Embeddings power semantic search.

Your Learning Roadmap

What to Learn Next, In Order of Impact

NOW
Master Prompt Engineering

This is your highest-leverage skill. Better prompts = better AI outputs instantly. No code needed.

NEXT
Understand RAG + Embeddings

This is how you make AI work with YOUR data. Critical for any product that handles private company info.

THEN
Learn Agentic Patterns

Router, Chain, Tool-Use Loop. These are the blueprints for building AI systems that do real work.

LATER
Explore Hugging Face & Open Source

Browse models, test in Spaces, understand what's possible. Useful for privacy-first features.

You don't need to build AI. You need to direct it. That's the skill that makes you irreplaceable.

✓ Course complete

Key takeaways

LLMs are tools, not oracles — pattern-matching, not reasoning. Always validate outputs.

RAG beats fine-tuning for most treasury use cases: cheaper, faster, and grounds answers in your real data.

An AI agent isn't a chatbot — it plans, acts, checks, and adjusts, using function calling to reach real tools.

Prompt engineering is your highest-leverage skill right now, and it needs no code.

Four agentic patterns — Router, Chain, Tool-Use Loop, Reflection — cover almost every AI system you'll build or evaluate.

You don't need to build AI. You need to direct it. That's the skill that makes you irreplaceable.

Built by a treasurer, for treasurers. · treasuryease.com