Introduction

Prompting is the practice of improving the performance of AI systems by refining the structure, style, and content of the instructions provided. As pre-trained models become more capable across diverse domains, effective prompting is now a key part of building scalable, high-quality AI solutions.

This guide outlines best practices for prompting across the TrueState platform. It covers prompting strategies in the following contexts:

Agents

Agents are the core intelligence layer in TrueState. They support analytics, dashboard building, data cleaning, and predictive modeling. While our agents are designed to be robust to varying instruction styles, performance improves significantly with good context management.

There are three types of context to manage:

1. Data context

Make sure agents are working with the right datasets. Good data context includes:

  • Clean, well-structured data
  • Descriptive column names
  • A complete data dictionary
  • A brief dataset description

See our Data Cleaning Guide for more guidance on preparing datasets.

2. Organisation context

Agents can reason better if they understand the organisational environment. Maintain:

  • A summary of your organisation
  • Departmental structure and responsibilities
  • Current business priorities

You can configure this in the organisation settings.

3. Problem context

Describe the analytics task clearly and completely. Include:

  1. Background – Why are you doing this analysis?
  2. Audience – Who is it for? What is their familiarity with data?
  3. Output – What do you need? Charts, commentary, statistical insights?

Agents will ask for clarification when necessary, but the better your prompt, the less back-and-forth is required.

LLM Inference in Pipelines

LLM inference steps are used in automations and text pipelines where smaller, task-specific models execute targeted logic. These models only see what you give them in the prompt—there is no built-in memory or background context.

Use the following structure for reliable inference prompts:

  1. Role
    Describe who or what the LLM is acting as.
    Example: “You are a paraphrasing assistant.”

  2. Task instructions
    Be clear about what you want.
    Example: “Simplify the following text while retaining all key information.”

  3. Format or style
    Specify desired output structure.
    Example: “Return a single paragraph under 100 words.”

  4. Examples (optional but recommended)
    Include an example input and the expected output.

  5. Input data
    Provide the data to be processed.

  6. Final instructions
    Include any constraints, fallbacks, or stylistic preferences.

Always test your prompt with a representative sample of your data before scaling it across workflows.

Automations

Automations in TrueState are used when the process matters as much as the result. They’re ideal for recurring tasks with well-defined logic, and often include multiple chained LLM inference steps.

Key practices for prompting in automations:

  • Break complex logic into multiple, smaller inference steps.
  • Keep prompts in each step focused and specific.
  • Avoid combining tasks like classification, rewriting, and summarisation in one prompt.

Rule of thumb: If you’re unsure whether to split a step in two—you probably should.

Similarity search uses embeddings to place text samples at a specific point in a “meaning universe”. The closer two samples are in meaning, the closer they are in this space.

To get reliable results, manage the following factors:

1. Text length

  • Too short (e.g. 3–5 words): Often lacks enough context to be embedded meaningfully.
  • Too long (e.g. full pages): May contain multiple unrelated ideas, leading to ambiguity.

Solution: Use an LLM to compress or expand text samples to ~1–3 sentences, depending on the use case.

2. Tone

Tone affects placement in the meaning universe.

  • Neutral analysis will embed differently than emotional critique or promotional writing.
  • Mismatched tone between search query and indexed content reduces performance.

Solution: Use LLMs to standardise tone across both indexed content and user queries.

Universal Classification

Universal classification allows a system to determine whether a specific statement is true based only on a text sample. It returns a probability score between 0 and 1.

Example 1 - High confidence

Sample: Jane drove to the market in her yellow Volkswagen Beetle
Statement: Jane owns a car
Score: 0.99

Example 2 - Contradiction

Sample: Jane drove to the market in her yellow Volkswagen Beetle
Statement: The car Jane drove was pink
Score: 0.01

Example 3 - Unrelated inference

Sample: Jane drove to the market in her yellow Volkswagen Beetle
Statement: Jane likes marmalade
Score: 0.01

Best practices:

  • Phrase your statement as a declarative, factual sentence—not a question.
  • Avoid vague or inferred logic not present in the text.
  • Use neutral phrasing without leading language.

Summary

Effective prompting is one of the highest-leverage tools you can use to increase the accuracy, efficiency, and usability of AI systems. Whether you’re building an agent workflow or configuring LLM inference in an automation, small improvements in prompt structure can unlock large gains in performance.

If you’re just getting started:

  • Keep prompts short and clear
  • Provide examples wherever possible
  • Test everything on real data before scaling