# Prompt Engineering

The Prompt Engineering template is available for advanced users familiar with GPT-3.

When a charm using this template runs, the prompt will run repeatedly-- once for each output cell.

You can add cell references to refer to input cell ranges; these references will be replaced with the value of the input cell corresponding to the iteration offset.

Tips for using this template:

* Use commands that are local to a single output cell, not an entire range. For example, a ChatGPT-style prompt like `rewrite all of the cells in French` will not work, but a prompt like `rewrite {{ input_text }} in French` will work-- assuming you specify a relevant range for the `input_text` cell reference.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.usecharm.ai/templates/prompt-engineering.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
