> This page is for version v4.0.
> For other versions, use one of these documentation indexes:
> - v5.0 (default): https://humanloop.com/docs/v5/llms.txt
> - v4.0: https://humanloop.com/docs/v4/llms.txt

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://humanloop.com/docs/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://humanloop.com/docs/_mcp/server.

> Discover how Humanloop manages prompts, with version control and rigorous evaluation for better performance.

![](/docs/_fern-img/c2f5bd2c52e04338463ecaab0f4f062c83f87d9ff98f66a49df50d7d3de1e7ed.webp)

A Prompt on Humanloop encapsulates the instructions and other configuration for how a large language model should perform a specific task. Each change in any of the following properties creates a new version of the Prompt:

* the template such as `Write a song about {{topic}}`
* the model e.g. `gpt-4o`
* all the parameters to the model such as `temperature`, `max_tokens`, `top_p` etc.
* any tools available to the model

A Prompt is callable in that if you supply the necessary inputs, it will return a response from the model.

Inputs are defined in the template through the double-curly bracket syntax e.g. `{{topic}}` and the value of the variable will need to be supplied when you call the Prompt to create a generation.

This separation of concerns, keeping configuration separate from the query time data, is crucial for enabling you to experiment with different configurations and evaluate any changes. The Prompt stores the configuration and the query time data are stored in [Logs](./logs), which can then be re-used in Datasets.

> **Warning**
>
> FYI: Prompts have recently been renamed from 'Projects'. The Project's "Model
> Configs" are now just each version of a Prompt. Some of the documentation and
> APIs may still refer to Projects and Model Configs.

> **Note**
>
> Note that we use a capitalized "Prompt" to refer to the entity in Humanloop,
> and a lowercase "prompt" to refer to the general concept of input to the
> model.

```jsx
---
model: gpt-4
temperature: 1.0
max_tokens: -1
provider: openai
endpoint: chat
---
<system>
  Write a song about {{topic}}
</system>
```

## Versioning

A Prompt file will have multiple versions as you try out different models, params or templates, but they should all be doing the same task, and in general should be swappable with one-another.

By versioning your Prompts, you can track how adjustments to the template or parameters influence the LLM's responses. This is crucial for iterative development, as you can pinpoint which versions produce the most relevant or accurate outputs for your specific use case.

### When to create a new Prompt

You should create a new Prompt for every different ‘task to be done’ with the LLM. For example each of these tasks are things that can be done by an LLM and should be a separate Prompt File: extractive summary, title creator, outline generator etc.

We've seen people find it useful to also create a Prompt called 'Playground' where they can free form experiment without concern of breaking anything or making a mess of their other Prompts.

## Using Prompts

Prompts are callable as an API. You supply and query-time data such as input values or user messages, and the model will respond with its text output.

**`TypeScript`**

```javascript TypeScript
const chatResponse = await humanloop.chatDeployed({
  project: "song writer",
  inputs: {
    topic: "debugging compiler errors",
  },
});
```

You can also use Prompts without proxying all requests through Humanloop.

## Serialization (`.prompt` file)

Our `.prompt` file format is a serialized version of a model config that is designed to be human-readable and suitable for checking into your version control systems alongside your code. See the [.prompt files reference](/docs/v4/prompt-file-format) for more details.

### Format

The .prompt file is heavily inspired by [MDX](https://mdxjs.com/), with model and hyperparameters specified in a YAML header alongside a JSX-inspired format for your Chat Template.

### Basic examples

**`Chat`**

```jsx Chat
---
model: gpt-4
temperature: 1.0
max_tokens: -1
provider: openai
endpoint: chat
---
<system>
  You are a friendly assistant.
</system>
```

**`Completion`**

```jsx Completion
---
model: claude-2
temperature: 0.7
max_tokens: 256
top_p: 1.0
provider: anthropic
endpoint: complete
---
Autocomplete the sentence.

Context: {{context}}

{{sentence}}

```

```
```