Pricing difference for AIP logic v/s Typescript code

I built a flow using AIP logic which involves calling LLMs, reading from ontology and writing back to ontology. I tried to replicate the same flow using Typescript and I see a significant lower cost on Resource Management tab while using Typescript. I am unsure about it being true.

  • Is there a Palantir pricing page where I can compare costs for running Typescript code v/s AIP logic on the same pipeline?
  • If there is a difference, can someone help me understand the reason for the same?
  • Are there some fixed costs which stay the same and some variable costs which get reduced based on using Typescript or AIP Logic?

Thanks

AIP calls tend to have a higher cost than typescript as they are typically interfacing with external LLM providers such as OpenAI. OpenAI has a per-token pricing structure.

Typescript is running locally within your Foundry instance on resources that scale with the amount of functions usage on your stack. It’s very difficult to quantify the cost of a single function call, as the compute is potentially shared across multiple function calls simultaneously for your stack.

Are you using LLMs from typescript via Query Functions or the like, or are you running vanilla code?

Thank you. I am using LLM from Typescript via GPT completion APIs

GPT_4o.createChatCompletion({
            messages: [userSystemMessage],
            params: { temperature: 0.0 },
});

My Typescript code involves invoking LLMs thrice, each with different prompts, along with ontology queries and vanilla code as well.

I am bringing in some support from our pricing team - pricing for completions in Typescript should be identical to AIP logic as they are going to the same models.

With regard to pricing per call, I’d recommend that you reach out to your palantir representative - I’m not privy to this, unfortunately.