Last updated: October 14, 2026
TL;DR AIP Logic is Palantir’s no-code environment for building LLM-powered functions from blocks, and AIP Evals is where you test them. Build with as few LLM blocks as possible, run every test at least three times, check intermediate steps, and treat LLM-as-a-judge evaluators as code that needs its own tests. Release through branches and staged writes so a prompt change never surprises production. Our AIP and AI agents team builds these weekly.
AIP Logic is Palantir’s no-code tool for building, testing, and releasing LLM-powered functions from blocks. AIP Evals is its testing environment, running suites of test cases and evaluators to measure how reliably those functions perform.
Getting an LLM function to work once takes an afternoon. Getting it to work the same way on Tuesday, after someone tweaks the prompt and the model gets upgraded, is the actual job.
That’s the gap between a demo and a workflow people rely on. In Palantir AIP, the demo half is AIP Logic, which Palantir describes as a no-code environment for building, testing, and releasing functions powered by LLMs. The reliability half is AIP Evals. Palantir’s own AIP features page calls Evals the foundation of stable, reliable AIP workflows in production.
This guide covers how Logic functions are built, the design choices that keep them cheap and predictable, how to write evals that catch real problems, how to judge the judges, and how to release safely. It goes deeper than our broader guide to AIP agents, which covers Chatbot Studio and tools.
What Is AIP Logic, and What Is It For?
AIP Logic builds functions that take Ontology objects or text as input, chain blocks like Use LLM, Apply action, and Execute function, and return an output or propose Ontology edits. Published functions can back Actions, Workshop buttons, and automations.
Think of a Logic function as one well-defined job. Classify this incoming claim. Draft a reply to this supplier. Pick which three maintenance orders matter most today and explain why.
The blocks documentation calls Use LLM the heart of AIP Logic, but the other blocks matter just as much.
| Block | What it does | When to use it |
|---|---|---|
| Use LLM | Sends a prompt to a model, with optional tools | Judgment, language, unstructured input |
| Apply action | Calls an Ontology Action directly, no LLM involved | Any edit you already know how to make |
| Execute function | Calls an existing TypeScript, Python, or Logic function | Math, lookups, rules your team already wrote |
| Conditionals | Branches on a condition | Different paths for different cases |
| Loops | Repeats over a collection | Processing a list of objects |
| Create variable | Stores a value for later blocks | Passing intermediate results cleanly |
Inside a Use LLM block, the model can call tools to apply Actions, call functions, query objects, or use a calculator. Any model available on your platform can be selected, including registered models your company brings itself.
One rule from the core concepts page surprises people. To edit the Ontology, a Logic function has to be published and called from an Action. Logic proposes. Actions commit. That separation is the whole safety model, and it’s a good one.
Logic vs Chatbot Studio, Which Should You Use?
Use AIP Logic for a defined task with known inputs and outputs, especially when it runs inside a workflow or automation. Use AIP Chatbot Studio, formerly AIP Agent Studio, when a person needs an open-ended conversation with tools.
Palantir doesn’t publish a formal decision matrix, so here’s ours.
| Question | Logic | Chatbot Studio |
|---|---|---|
| Is the input structured, like one object or one document? | Yes | Not necessarily |
| Is the output a fixed shape, like a category or a draft? | Yes | No, it’s a conversation |
| Does it run without a person, triggered by new data? | Yes, through Automate | Rarely |
| Does a user need to ask follow-up questions? | No | Yes |
| Is it easy to test with pass or fail criteria? | Usually | Harder |
The two aren’t rivals. A chatbot often calls Logic functions as tools, which is a pattern we like. The fuzzy conversation happens in the chatbot. The repeatable, tested work happens in Logic.
How Do You Design a Logic Function That Stays Reliable?
Use deterministic blocks wherever you can and LLM blocks only where judgment is needed. Keep temperature at the default of 0, send only the properties the model needs, return structured outputs, and split one giant prompt into smaller steps you can test separately.
The fastest way to an unreliable function is one enormous prompt that does everything. Classify, extract, decide, draft, and update. When it fails, you can’t tell which part broke.
Here’s how we design them.
- Do the math in an Execute function block. Models are bad accountants
- Apply known edits with Apply action, not by asking the LLM to call the Action
- Use a struct output so one LLM block returns several named fields instead of free text you parse later
- Send three properties, not thirty. Fewer tokens, less confusion, lower cost
- Keep temperature at 0, which the Logic FAQ confirms is the default
- Split the job when one step’s output deserves its own test
That last bullet connects directly to Evals. Every block boundary is a place you can test.
Cost follows the same logic. Palantir’s compute usage page says a basic LLM block uses 4 compute-seconds and an LLM tool execution uses 8, while Action, function, and transform blocks carry no direct charge. Palantir’s own worked example of two LLM blocks, one calling an Action, comes to 16 compute-seconds per run. Enterprise contracts can differ, so check yours. Our Foundry pricing guide explains how compute-seconds turn into money.
Small numbers per run. Not small at 200,000 runs a month.

What Is AIP Evals, and How Does It Work?
AIP Evals is a testing environment for AIP Logic functions, AIP Chatbot functions, and code-authored functions. You build a suite of test cases and evaluators, run it, compare results across models or prompts, and see which cases fail and why.
The Evals overview defines a suite as the collection of test cases, target functions, and evaluation functions used to benchmark performance. In plain terms, a list of inputs, what good looks like for each, and the checks that decide pass or fail.
There are three ways to start, per the getting started guide. Turn real past runs into test cases with Add as test case. Write test cases by hand. Or let AIP generate a starting set, where your enrollment supports it.
Our preference is real runs first. The Logic FAQ suggests choosing 5 to 10 input and output pairs and running them every time you change a prompt. That’s the floor. Production functions in our builds usually reach 30 to 60 cases within a month, mostly from failures users reported.
Two features deserve special mention.
Ontology edits are tested safely. Each test case runs in an Ontology simulation, so the real Ontology stays unchanged during testing. You can test a function that reassigns 50 work orders without reassigning anything.
And you can test the middle of a chain. Palantir’s docs on intermediate parameters note that evaluating only the end result may be insufficient, and let you expose any block’s output for evaluation. If step two misclassifies and step four happens to land on the right answer anyway, you want to know.
Which Evaluators Should You Use?
Use deterministic evaluators wherever the right answer is checkable, like exact matches, ranges, or object checks. Use LLM-as-a-judge only for qualities code can’t measure, like tone or whether a summary is faithful, and test the judge itself.
The create suite page lists the built-in evaluators.
| Evaluator family | Examples | Best for |
|---|---|---|
| Matches | Exact match for booleans, strings, arrays, regex | Classifications, extracted IDs, yes or no decisions |
| Text checks | Levenshtein distance, string length, keyword checker, ROUGE | Drafts that must include or avoid certain content |
| Objects | Exact object match, object set contains, object set size range | Functions that select or edit objects |
| Ranges | Integer, floating point, and temporal ranges | Scores, quantities, dates |
| LLM-as-a-judge | A condition the judge model marks true or false | Tone, faithfulness, policy compliance |
| Custom | Your own published function or Logic function returning a boolean or number | Business rules nothing built-in covers |
Anthropic’s guidance on building evals makes the same point from the model side. Code-based grading is the fastest and most reliable, and more test cases with automated grading beat a few hand-graded ones.
A pattern that works well. Check the category with exact match, check the confidence score with a range, and use a judge only for the one sentence of explanation. Three evaluators, one of them fuzzy. Not five fuzzy ones.
How Do You Keep LLM-as-a-Judge Honest?
Treat the judge like any other LLM function. Give it a narrow condition, include examples of pass and fail, ask for supporting quotes, and write evals for the judge. Research shows judges agree with humans often but carry known biases.
The best-known study, Zheng and colleagues at NeurIPS 2023, found strong judge models reached over 80% agreement with human preferences, about the same as humans agree with each other. The same paper documented position, verbosity, and self-enhancement biases. Judges can prefer longer answers, and answers that sound like their own.
So 80% is good. It’s also one wrong grade in five.
A Palantir Community guide on writing effective evals gives practical rules we agree with. Keep evaluators to simple pass or fail outputs. Bring in domain experts to define what correct means. Give the judge clear prompts with examples of pass and fail, and have it return supporting quotes from the input. And write evals for your LLM-as-a-judge functions.
That last one gets skipped constantly. Build a small set of cases where you already know the right grade, including a couple of tricky ones, and check the judge gets them right before you trust its scores on anything else.

How Do You Handle the Fact That LLMs Aren’t Deterministic?
Run each test case several times and look at pass rates, not single results. Palantir recommends at least three runs for LLM-backed functions, and a case with multiple iterations passes only when every iteration passes.
That rule comes straight from the run suite docs and the create suite page. It’s strict on purpose. A function that’s right two times out of three isn’t right.
Set the bar per function, not globally. A Palantir Community evals worksheet gives example targets like 95% accuracy for classification and 100% valid syntax for generated code. A supplier email draft reviewed by a human before sending can live with less. An automated status change can’t.
And accept that some cases will fail. The Community guide says it’s normal to accept some failing test cases. What matters is knowing which ones, why, and whether the rate is moving up or down.
How Do You Compare Models and Prompts?
With Evals experiments. Parameterize the model and the prompt, run a grid search across combinations, and compare up to four runs side by side on pass rate, failures, and cost. Pick the cheapest setup that clears your bar.
The experiments docs describe exactly this, and note experiments aren’t limited to Logic functions.
This is where the money is. We routinely see a smaller, cheaper model match a larger one once the prompt is tightened and the inputs are trimmed. Without an eval suite, nobody dares make that swap. With one, it’s a 20-minute decision backed by numbers.
Model upgrades work the same way. When a new model version lands, rerun the suite before switching. Palantir lets you swap models across many Logic functions at once through Workflow Lineage, which is powerful and exactly why you want tests in front of it.
When a run fails, the results analyzer in AI FDE can group failing cases by root cause and suggest prompt changes. Useful for triage. Still read the failures yourself.

How Do You Release Logic Functions Safely?
Develop on a branch, run your eval suite, review, and merge through a proposal. Use staged writes so Ontology edits apply only when a run completes, route automated edits through Actions, and watch success rates and latency after release.
The pieces are all in Foundry.
- Work on a branch. Logic integrates with Global Branching, and with protection on, every change is made on a branch, reviewed, and merged through a proposal.
- Run the suite on the branch and compare against the current release.
- Turn on staged writes, currently in beta, so edits go to temporary storage and apply only when the run finishes.
- For automations, call the function through an Action type, and use the Proposals tab so a person can accept staged changes before they land.
- Watch Logic metrics after release, which show success and failure counts and P95 execution time over 30 days.
- Add every production failure as a new test case. The suite should grow every week.
Two traps worth knowing. Functions behave differently in the Debugger than in production. The FAQ notes the Debugger isn’t subject to the five-minute execution limit, but calls from Workshop or the API are. A slow function that works in testing can time out for real users.
And toggling staged writes publishes a new major version, which automations don’t pick up automatically. Update the automation, or wonder for a week why your fix isn’t running.
Logic functions are only one part of what runs in production. Our guide to running Foundry in production covers models, monitoring, and alerts across the platform.

Where Do Logic and Evals Projects Go Wrong?
Too few test cases, judges nobody checked, one giant prompt, no link between production failures and the test suite, and model upgrades shipped untested. Every one of these is a process gap rather than a product limit.
What we see most, roughly in order.
Ten test cases written on day one and never touched again. The suite should reflect what users actually send, and that changes.
Evaluating only the final output. The function gets the right answer for the wrong reason, until it doesn’t.
Judges with vague conditions. Is the summary good? Good for whom? Write the condition so two of your experts would grade the same way.
No owner. Somebody has to read the failures every week. A dashboard nobody opens is decoration.
And building in Logic what should be code. If a step is pure arithmetic or a fixed rule, put it in a function. Cheaper, faster, and it never hallucinates.
Bias disclosed, since we build and test these for a living. A single day spent writing tests often reveals major failures, which the Community guide also says. We’ve watched that happen on nearly every project we’ve inherited.
Make the Eval Suite the Product
Three things to remember. Build Logic functions mostly from deterministic blocks, with LLM blocks only where judgment is needed. Run evals three or more times per case, test intermediate steps, and test your judges. And release through branches, staged writes, and Actions, adding every production failure back into the suite.
PAL4C Labs is an independent, Palantir-exclusive consultancy. We build and test AIP Logic functions, agents, and Ontologies for operations, supply chain, healthcare, and regulatory teams, and we’re not affiliated with Palantir.
Have a Logic function that works in demos but wobbles in production? Send us the function’s job and five examples of where it went wrong. We’ll design the eval suite with you, including the evaluators, pass thresholds, and release steps, so the next prompt change ships with evidence. External agents can reach the same functions through Ontology MCP once they’re tested.
Questions Teams Ask About AIP Logic and Evals
So What Exactly Does AIP Logic Do?
It builds LLM-powered functions from blocks without code. Functions take Ontology objects or text, chain LLM, Action, and function blocks, and return outputs or propose edits that apply through Actions.
Logic vs Chatbot Studio, Which One for My Use Case?
Logic for defined jobs with fixed inputs and outputs, especially automated ones. Chatbot Studio, formerly Agent Studio, for open-ended conversations where users ask follow-ups. Many good builds use both, with the chatbot calling tested Logic functions as tools.
How Many Test Cases Does an Eval Suite Need?
Start with 5 to 10, which Palantir’s own FAQ suggests, drawn from real runs. Grow it every time production surfaces a failure. Thirty to sixty cases for a busy function isn’t unusual after a month.
Why Does My Function Work in the Debugger but Fail in Workshop?
Usually the execution time limit. The Debugger isn’t bound by the five-minute limit, but calls from Workshop or the API are. Trim inputs, split blocks, or move heavy steps into functions.
Can LLM-as-a-Judge Be Trusted?
With care. Research found strong judge models agree with human preferences over 80% of the time but carry position and verbosity biases. Give the judge narrow conditions and examples, ask for quotes, and build a small eval suite for the judge itself.
How Much Does a Logic Function Cost to Run?
Per Palantir’s published figures, a basic LLM block uses 4 compute-seconds and an LLM tool execution uses 8, with Action and function blocks carrying no direct charge. Enterprise contracts can differ, so confirm your rates.
Can Evals Test Functions That Edit the Ontology?
Safely, yes. Each test case runs in an Ontology simulation, so the real Ontology stays untouched while you check what the function would have changed.

