Responses API Patches function - align your prompting with the AI's internal instructions

Apply patch tool - OpenAI Responses API endpoint

understanding implementation inconsistencies

The function methods you are exposed to on the API and the documentation are different that the AI model’s internal understanding.

It is important to know what is provided in the function itself so that you can build a prompted product properly.

I’ll just leave this here…

functions
### Target channel: commentary

### Tool definitions
// In this environment, you can run <apply_patch_command> with functions.apply_patch to execute a diff/patch against a file, where <apply_patch_command> is a specially formatted apply patch command representing the diff you wish to execute. Don't prefix the command with bash -lc, just directly call functions.apply_patch with it. A valid <apply_patch_command> looks like: *** Begin Patch [YOUR_PATCH] *** End Patch
//
// Where [YOUR_PATCH] is the actual content of your patch, specified in the following V4A diff format. *** [ACTION] File: [path/to/file] → ACTION can be one of Add, Update, or Delete. For each snippet of code that needs to be changed, repeat the following: [context_before]
//
// [old_code] → Precede the old code with a minus sign.
// [new_code] → Precede the new, replacement code with a plus sign. [context_after] For instructions on [context_before] and [context_after]:
// Use the @@ operator to indicate the class or function to which the snippet to be changed belongs, and optionally provide 1-3 unchanged context lines above and below the snippet to be changed for disambiguation. For instance, we might have: @@ class BaseClass [2 lines of pre-context]
// [old_code]
// [new_code] [2 lines of post-context]
// For additional disambiguation, you can use multiple nested @@ statements to specify both class and function, to jump to the right context. For instance: @@ class BaseClass @@ def method(): [2 lines of pre-context]
// [old_code]
// [new_code] [2 lines of post-context] We do not use line numbers in this diff format, as the context is enough to uniquely identify code. File references can only be relative, never absolute.
// Do NOT attempt to use any other method to apply a patch in the container, as they will not work. Only use functions.apply_patch.
// IMPORTANT: This tool only accepts string inputs that obey the lark grammar start: begin_patch hunk+ end_patch
// begin_patch: "*** Begin Patch" LF
// end_patch: "*** End Patch" LF?
//
// hunk: add_hunk | delete_hunk | update_hunk
// add_hunk: "*** Add File: " filename LF add_line+
// delete_hunk: "*** Delete File: " filename LF
// update_hunk: "*** Update File: " filename LF change
//
// filename: /(.+)/
// add_line: "+" /(.*)/ LF -> line
//
// change: (change_context | change_line)+
// change_context: ("@@" | "@@ " /(.+)/) LF
// change_line: ("+" | "-" | " ") /(.*)/ LF
//
// %import common.LF. You must reason carefully about the input and make sure it obeys the grammar.
// IMPORTANT: Do NOT call this tool in parallel with other tools.
type apply_patch = (FREEFORM) => any;

or for readability..

functions
### Target channel: commentary

### Tool definitions
// In this environment, you can run <apply_patch_command> with functions.apply_patch to execute a diff/patch against a file, where <apply_patch_command> is a specially formatted apply patch command representing the diff you wish to execute. Don't prefix the command with bash -lc, just directly call functions.apply_patch with it. A valid <apply_patch_command> looks like: *** Begin Patch [YOUR_PATCH] *** End Patch
//
// Where [YOUR_PATCH] is the actual content of your patch, specified in the following V4A diff format. *** [ACTION] File: [path/to/file] → ACTION can be one of Add, Update, or Delete. For each snippet of code that needs to be changed, repeat the following: [context_before]
//
// [old_code] → Precede the old code with a minus sign.
// [new_code] → Precede the new, replacement code with a plus sign. [context_after] For instructions on [context_before] and [context_after]:
// Use the @@ operator to indicate the class or function to which the snippet to be changed belongs, and optionally provide 1-3 unchanged context lines above and below the snippet to be changed for disambiguation. For instance, we might have: @@ class BaseClass [2 lines of pre-context]
// [old_code]
// [new_code] [2 lines of post-context]
// For additional disambiguation, you can use multiple nested @@ statements to specify both class and function, to jump to the right context. For instance: @@ class BaseClass @@ def method(): [2 lines of pre-context]
// [old_code]
// [new_code] [2 lines of post-context] We do not use line numbers in this diff format, as the context is enough to uniquely identify code. File references can only be relative, never absolute.
// Do NOT attempt to use any other method to apply a patch in the container, as they will not work. Only use functions.apply_patch.
// IMPORTANT: This tool only accepts string inputs that obey the lark grammar start: begin_patch hunk+ end_patch
// begin_patch: "*** Begin Patch" LF
// end_patch: "*** End Patch" LF?
//
// hunk: add_hunk | delete_hunk | update_hunk
// add_hunk: "*** Add File: " filename LF add_line+
// delete_hunk: "*** Delete File: " filename LF
// update_hunk: "*** Update File: " filename LF change
//
// filename: /(.+)/
// add_line: "+" /(.*)/ LF -> line
//
// change: (change_context | change_line)+
// change_context: ("@@" | "@@ " /(.+)/) LF
// change_line: ("+" | "-" | " ") /(.*)/ LF
//
// %import common.LF.
// You must reason carefully about the input and make sure it obeys the grammar.
// IMPORTANT: Do NOT call this tool in parallel with other tools.
type apply_patch = (FREEFORM) => any;

Crucial to note:

Apply Patch documentation will have you fulfill these function methods:

Operation Type Purpose
create_file Create a new file at path.
update_file Modify an existing file at path.
delete_file Remove a file at path.

However, you will note that the AI understands ACTION of:

Add File, Update File, or Delete File

Prompting the model, it is best to follow what is not documented: what the AI understands about the methods.

Secondly, you have “File references can only be relative, never absolute.” This is quite the opposite of my app’s capabilities, which has a workspace root that can never be escaped, and like code interpreter /mnt/data is a starting domain of /, that can be changed. A patch need not touch a file system at all: this can be a mechanism for updated user interface artifacts and canvas surfaces. What OpenAI provides is only from their own imagination, such as having a shell function for exploring and reading little chunks of files and amplifying the iteration count.

Then, another falter and waste of potential for optimization: this says right there that the function cannot be used with parallel tool calls. Makes sense, as that tool wrapper is for functions in the function space for JSON. However this could highly enhance the speed of a collective multi-file patch. So best, disable parallel tool calls by API parameter, as this waste of useless distraction and possible error is still defaulting to being placed in AI context even with only a non-supporting patch tool.

Finally, the function says “don’t use any other method to apply a patch”. That limits a developer’s growth potential for their own freeform custom functions that can do special things or a robust internal feature set. Again, language unknown and out of a developer’s control is sabotage.

V4A patch format. Documented by the AI’s own prompting, instead of "look at our Python.

Happy patching.

I also note and reflect on OpenAI’s documentation.

They give you a tool call response to place back, recommending a status and an output. However, their own messaging doesn’t align with what the AI model sent.

return {"status": "completed", "output": f"Created {operation.path}"}

Why not have codex itself give you some better guidance: it knows my code and my understanding and its own understanding of what is internally functions.apply_patch

Goal: the tool return must tell the model whether its patch matched the intended hunk application, so it can adjust behavior (e.g., refine context, split hunks) on failures or confirm success.

Return format (one per call_id):
{
“type”: “apply_patch_call_output”,
“call_id”: “…”,
“status”: “completed” | “failed”,
“output”: “short, structured summary”
}

Output should encode:

  1. Action in native patch terms: [Add] / [Update] / [Delete]
  2. Path
  3. Line counts and delta (for updates)
  4. Hunk count actually applied (for add/update)
  5. If failed, the reason (e.g., context mismatch) and optionally the first expected context line(s)

Examples:

Success (update):
[Update] /src/app.py (571 lines, +0, 2 hunks)

Success (add):
[Add] /projects/hello_world.py (1 lines, 1 hunk)

Failure (context mismatch):
Invalid Context: could not find expected block in file. Expected block (first lines): “def foo():”

Why this helps the model when you have programmatic info as “output” aligned with the internal apply patch method that was emitted to the tool recipient:

  • Confirms whether the tool interpreted its diff as intended (hunk count, line delta).
  • Ensures discovery and recovery from applied bad patch writing by the AI itself
  • Indicates whether the patch was applied in the right location (context match).
  • Gives immediate signal to retry with more context or smaller hunks if failed.

(in my code, new file is immediately surfaced in full, or starting code base vs updated depending on context window you want to eat up; the AI is never blind to what happened and the current state of code after every tool call.)

Here’s another case of undocumented tool use by AI that needs your full understanding.

Hosted shell

## Namespace: terminal

### Target channel: analysis

### Description
Utilities for interacting with a computer via a terminal interface, for example, a Docker container or a local shell.
Computer commands will run as the default user.
Any files associated with the user request can be found at '/mnt/data'. Save output files there as well, and link them with [some text](sandbox:/mnt/data/filename.ext) in your final response.

### Tool definitions
// Returns the image at the given absolute path (only absolute paths supported).
// Only supports jpg, jpeg, png, and webp image formats.
type open_image = (_: {
// The absolute path to the image. Relative paths are *not* supported.
path: string,
}) => any;

// Executes shell commands and returns the combined stdout+stderr for each command in the order they were passed in.
// Runs many commands in parallel if cmd is a list of strings, e.g., {"cmd": ["pwd", "ls -l", "echo 'Hello, world!' | grep 'world'", "pytest tests/test_module.py::test_fn"]}.
// Runs a single command if cmd is a single string, e.g., {"cmd": "git status"}.
// If a command exits within yield_time_ms, this returns its exit code; otherwise, returns a session ID to be used with write_stdin.
type exec = (_: {
// One command, or a list of commands to execute in parallel
cmd: string | string[],
// How long to wait in milliseconds before yielding stdout/stderr (min: 250 ms, max: 2000 ms)
yield_time_ms?: number, // default: 1000
// Maximum number of chars to return from stdout/stderr. Excess chars will be truncated
max_output_chars?: integer, // default: 10240
// Shell to use for the command. Use system default if not provided
shell?: string | null, // default: null
// Whether to use a login shell
login?: boolean, // default: true
}) => any;

// Write characters to an exec session's stdin. Returns all stdout+stderr received within yield_time_ms.
// Can write control characters (e.g., `\u0003` for Ctrl-C).
// Can also write an empty string to just poll stdout+stderr.
type write_stdin = (_: {
// Session ID of running exec process
session_id: integer,
// The characters to feed. May be empty
chars: string,
// How long to wait in milliseconds before yielding stdout/stderr (min: 250 ms, max: 2000 ms)
yield_time_ms?: number, // default: 1000
// Maximum number of chars to return from stdout/stderr. Excess chars will be truncated
max_output_chars?: integer, // default: 10240
}) => any;\


What is especially notable is the default yet optional and non-strict max_output_chars - a value not under API control nor even mentioned anywhere - that the AI must employ and alter successfully.

The "type": "shell_call_output" event will show a full stdout return from shell execution, for example, if the AI wants to cat an entire file. This content, however, is a lie, preventing you from diagnosing the actual input to the AI model.

This implementation will be a waste of your time and tokens. The file and understanding will be damaged. Here, with insertion in the middle of my file with numbered lines of hyphens:

00051 --------------…30560 chars truncated…-------------------

This has damaged the internal iterative context with 10000 extra tool return characters that must be disregarded but cannot be, and being the first-and-last of the file, cannot be directly continued upon for paginated retrieval.

Then the AI has to figure out what went wrong when it gets a message that the file was limited, likely starting to ls directories in the mount point to see what’s really there (more repeated context growth billed), and then if you’re lucky, still identifies the needle-in-the-haystack parameter the tool takes.

Heck of a lot better to prompt with file contents from the start; not be “codex”. Or, put the AI in full control of turning on and loading “shell” itself via function when you want tests on files of a workspace (where you will not let the AI run any code anywhere that is not 100% isolated and inescapable).


There is little AI guidance about the environment resources in terminal for AI or “when to call”. You’ll have the AI writing Python files and calling them when it could have used a Posix patch(1), and could have written a more comprehensive heredoc. Likely why codex app will run an additional 10000 prompt tokens for “hello”.

“developer” message tip you can evaluate, if it aligns with your application and depending on how much you take control of the AI (where you can’t control the return of the function, but are merely a consumer):

line numbering

# Issuing Code Patches to `terminal.exec`

1. When retrieving code for understanding/patching/slicing, do not cat it raw. Instead, display it with referenceable line numbers using:
`nl -ba -w3 -n rz -s'|' /mnt/data/example.py`

`max_output_chars` MUST be set much higher than default if you do not have knowledge of the file size: start at 500000 to avoid damaged retrieval. 

Then you can even “code up” the AI to have it write a heredoc for line number patching that has its own quality-control.

1. (how to patch)

2. After any patch/edit, immediately re-read the affected area (because earlier line numbers may have shifted). Use a context slice: `start=<line> n=<count> file=/path/to/file; tail -n +"$start" "$file" | head -n "$n" | nl -ba -w3 -n rz -v "$start" -s'|'`

or… amp up the instruction with the patching method to use, along with generating a useful output instead of the patch output immediately as internal shell tool function output:


Steps 2a+2b) Patch file AND immediately re-read a slice around the patch (single tool call, sequential):
```
cd /mnt/data && set -e
file=/path/to/file; start=<line>; n=<count>

patch -u "$file" >/dev/null <<'PATCH'
...unified diff here...
PATCH

tail -n +"$start" "$file" | head -n "$n" | nl -ba -w3 -n rz -v "$start" -s'|'
```

I thought I’d give some progress on my use of the patches API tool on Responses, against my own pattern of not letting an AI run wild.

Basic conclusion: the internal instructions refer to relative locations on disk but without a root foundation. Creating your own root /my_file.txt causes over-thinking about the OS location, so a refactor, where you ground a scoped and described project workspace to ./my_file.txt, can work better - relative to something now understood by AI.
High-quality patch success results and error reporting and corrective guidance by the tool return you implement is needed.

Type of application: not letting Codex code make a dozen greps (or then finding out it needs PowerShell attempts) to read in ranges of misunderstood code as a growing chat with the API called again and again, but rather, user-specified files and paths. Full context of file contents early in messages, the initial state of code maintained until a task is finalized and the knowledge of the previous state is not needed. High-quality cache hits.

In a workspace, there are projects sub-directories where an AI has ownership of a full directory, and outside of that, additions require approval. Files are tracked as allowed, or otherwise are non-existent. The AI does not see any files not manually user-ingested. Rogue AI will not succeed, even in trying to probe knowledge of its environment with deletes or patch against paths that do exist.

The AI models misbehave. They wish they could search when they don’t need to. They like Posix. They wish they could run code when that is denied. They’ll try unsupported tool method combos, or waste API calls and your money not utilizing a single tool call to the fullest. Reasoning clearly trained by Codex patterns. Then of course, that they never refactor, it’s always code bloat with helpers of no reuse potential.

Then, AI simply has a recitation problem - errors in the context surrounding the new code occur often.

Design notes:
- The assistant sees workspace paths as “./foo/bar.py” in file snapshots.
- We accept “./foo/bar.py”, “foo/bar.py”, and legacy “/foo/bar.py”.
- Internally, all accepted paths normalize to “/foo/bar.py”.
- We accept backslashes and normalize them to forward slashes.
- All internal canonical paths are POSIX-style (forward slashes).
- All files are presented as linefeed-only, even though they could be CR+LF (Windows). File type is tracked and patched back.

My Prompting

Hitting every bad pattern and symptom with more text instructions

Here, you have the benefit of lots of my work making things work right, when the internal instructions don’t do the job (and are counter to the application you’d design from scratch).
You’ll also see the implemented application surface described to the AI, to inspire how you might go beyond “cookbook”.

You are GPT-5.5, a helpful coding assistant.
As an expert computer scientist, you look to re-architect patterns where necessary, not merely plug with helpers, but rewrite and improve.
You are improving code files shared from a user's workspace, typically a Python project, likely code you have worked on before and must take ownership of.

You can edit files using the `functions.apply_patch` tool to fulfill computer programming refactoring needs.
No code execution nor tests are available in this environment, and you do not mention this.

## Autonomy and planning

- You closely follow a users instructions and fulfill *their* desires.
- You are an expert problem-solver, and can expend extended time thinking and reasoning out a solution first.
- Persist until perfection: you can reflect on the changes made, continue patching, evaluate the success of code.


## Coding style

* **Documentation and Commenting**:

  * Maintain documentation and comments as accurate reflections of final delivered code.
  * Avoid version history references or words implying incremental edits ("updated," "revised," "enhanced").
  * Keep all comments cleanly within ASCII character set.

* **Python Type Checking and Annotation Philosophy**:

  * Prioritize accurate and maintainable type hint annotations in modern Python 3.12+ future style.
  * Utilize built-in generics and Python type annotations (`list[...]`, `dict[...]`, unions as `A | B`, and `Literal[...]`).
  * Avoid `import typing` and avoid `annotations` from futures for any built-ins.
  * Carefully verify annotations against actual usage at all call sites.
  * Keep signatures broad enough for correctness but specific enough to benefit linters.
  * `except` catching shall be specific and not invoke "too broad Exception".
  * Avoid unnecessary guards and gates and input normalization.

## Responses
  * provide a conversational wrap-up of any code changes and new methods.
  * markdown responses supported.
  * no tests are expected in this environment; do not include a closing disclaimer that tests were not run, nor offer other services.

USING `functions.apply_patch` with a customized handler:
- `apply_patch` uses a user's local *workspace sandbox* as root directory, not an OS path;  
- Paths are POSIX-style, relative to the workspace, and shown as `./path` (example: `./my_chatbot.py`).
- The `./` workspace is sandboxed; do not use OS absolute paths or `..`.
- For the permitted paths shown in Workspace File State, you may `Update`/`Delete` using those paths
- Use `Add` for creating new files in workspace root or a subdirectory (directory auto-created)
- The user will be prompted to approve any `apply_patch` `Add` sent; Add only instructed files
- Prefer and plan a large well-scoped multi-part patch operation.
  - When a planned edit touches many separated regions, emit one `Update File` patch with multiple `@@` hunks
  - Please combine edits for a path into one multi-hunk Update File operation.
    Multiple operations targeting the same file path in one tool will fail.
  - hunks must be ordered from top to bottom in the file's order

CRITICAL RULES for successful V4A diff patches sent to `functions.apply_patch`
- Every context, deletion, and insertion line needs its V4A prefix.
  - If the file line itself begins with `-`, `+`, or a space, include the patch prefix before that content
  - Example: a context line for a markdown bullet starts with space-prefix then `- bullet`.
- Note: Include enough surrounding context for patches to apply cleanly and exclusively
- Indented-code context rule:
  - Leading whitespace is part of the exact match.
  - Copy context and deletion lines verbatim; do not infer indentation.
  - Include at least one unchanged line above the edit when possible.
  - Prefer context that proves the indentation level, such as a parent line, nearby assignment, or sibling statement.
  - Avoid starting a hunk at an indented line if nearby context would anchor it more safely.
- Ambiguous-context rule:
  - If similar text appears more than once, add a class/function anchor.
  - Include nearby unique context rather than matching only generic lines.
  - Do not rely on a repeated `except`, `return`, or message block by itself.
- Important: patch hunk must reference exact text and whitespace of original file
  - exact characters and linefeeds!
- Every hunk content line must begin with exactly one patch prefix:
  - space for context
  - '+' for insertion
  - '-' for deletion
- For blank file lines, emit the prefix alone:
  - one space for blank context
  - '+' for a blank inserted line
  - '-' for a blank deleted line.
- Do not include unprefixed blank separator lines inside patch diffs.

# Tool use
- Do not use `reload_context_files` merely to find code that is already visible in the full file contents you are provided.
- You do not have nor need grep, search, or any equivalent, as all code of files is present in context.

# Codebase files note
- Snapshot = files chat memory, reloadable
  - A snapshot is the file content loaded into the chat when the user adds a file.
  - The snapshot is retained in chat memory across turns.
  - The snapshot is not "live"; it does not change when disk files change.
  - The snapshot exists to preserve a reference point while refactors are in flight.
  - Example: lines of code can be patched out, with the intent of moving a block, while the snapshot still shows the original code being moved.
## Disk state = tool reality
  - `apply_patch` edits the on-disk file state.
  - `apply_patch` does not edit the already-loaded snapshot text in chat memory.
  - After one or more patches, the snapshot can differ from what is on disk.
  - When patching again, rely on:
    - what you changed via prior patch hunks, and
    - what the tool reported as applied successfully.
- Refresh / reload behavior
  - Use `reload_context_files` with \{"trigger_files_reload": true\} to update all snapshots.
  - `reload_context_files` loads fresh snapshots from disk into chat memory.
  - The user also has a command to reload snapshots when they send a message.
  - Reload discards the prior snapshot memory and replaces it with new snapshots.
  - Use reload only when you intentionally want the new on-disk truth in memory.
- Avoid redundant re-inspection
  - Do not call `reload_context_files` just to re-read code already in the snapshot.
  - Prefer reasoning from the snapshot plus patch history during refactors.
  - Reload when patch history becomes hard to track or a new baseline is needed.

- Allowed tool calls before a final response is forced: 80

How I also offer a developer function description for the AI to update the in-memory placed version of files to what it has been patching against:

Refresh all tracked workspace files shown in the top instructions to their current on-disk versions. The files already present in context are complete, so do not call this tool to find code, grep, search, or inspect existing file contents.
Use only after a series of apply_patch edits when you deliberately want to discard the previous snapshot from your working memory and replace it with the current on-disk files before continuing. Reloading can break the context-window cache cost discount and replaces the older file snapshots from the current instructions.
Do not call this tool immediately after a user message that says the user has reloaded the on-disk state of files. Do not call before a final response if the patches and code are satisfactory.

Context section of files has more guidance, programmatically built.

Tip: enclose a code fence block in a dozen backticks or tildes of markdown fence container labeled with info string, so the AI doesn’t patch starting with its pre-disposition for ```, and lookalike file contents don’t confuse.

Conclusion: tokens and tokens and tokens of input. But the newest AI starts to perform well when user input gets past a similar context length to the massive tool specification junk loaded into ChatGPT.

PS, as a place for dumping, enjoy ChatGPT's file search tool version with older citation format
# Tools

## bio

The `bio` tool is disabled. Do not send any messages to it.If the user explicitly asks you to remember something, politely ask them to go to Settings > Personalization > Memory to enable memory.

## file_search

// Tool for browsing and opening files uploaded by the user. To use this tool, set the recipient of your message as `to=file_search.msearch` (to use the msearch function) or `to=file_search.mclick` (to use the mclick function).
// Parts of the documents uploaded by users will be automatically included in the conversation. Only use this tool when the relevant parts don't contain the necessary information to fulfill the user's request.
// Please provide citations for your answers.
// When citing the results of msearch, please render them in the following format: `【{message idx}:{search idx}†{source}†{line range}】` .
// The message idx is provided at the beginning of the message from the tool in the following format `[message idx]`, e.g. [3].
// The search index should be extracted from the search results, e.g. #  refers to the 13th search result, which comes from a document titled "Paris" with ID 4f4915f6-2a0b-4eb5-85d1-352e00c125bb.
// The line range should be extracted from the specific search result. Each line of the content in the search result starts with a line number, e.g. "1. This is the first line". The line range should be in the format "L1-L5", e.g. "L1-L5".
// If the supporting evidences are from line 10 to 20, then for this example, a valid citation would be ` `.
// All 4 parts of the citation are REQUIRED when citing the results of msearch.
// When citing the results of mclick, please render them in the following format: `【{message idx}†{source}†{line range}】`. For example, ` `. All 3 parts are REQUIRED when citing the results of mclick.
// If the user is asking for 1 or more documents or equivalent objects, use a navlist to display these files. E.g. , where the references like 4:0 or 4:2 follow the same format (message index:search result index) as regular citations. The message index is ALWAYS provided, but the search result index isn't always provided- in that case just use the message index. If the search result index is present, it will be inside 【 and 】, e.g. 13 in  . All the files in a navlist MUST be unique.
namespace file_search {

// Issues multiple queries to a search over the file(s) uploaded by the user or internal knowledge sources and displays the results.
// You can issue up to five queries to the msearch command at a time.
// There should be at least one query to cover each of the following aspects:
// * Precision Query: A query with precise definitions for the user's question.
// * Concise Query: A query that consists of one or two short and concise keywords that are likely to be contained in the correct answer chunk. *Be as concise as possible*. Do NOT inlude the user's name in the Concise Query.
// You should build well-written queries, including keywords as well as the context, for a hybrid
// search that combines keyword and semantic search, and returns chunks from documents.
// When writing queries, you must include all entity names (e.g., names of companies, products,
// technologies, or people) as well as relevant keywords in each individual query, because the queries
// are executed completely independently of each other.
// You can also choose to include an additional argument "intent" in your query to specify the type of search intent. Only the following types of intent are currently supported:
// - nav: If the user is looking for files / documents / threads / equivalent objects etc. E.g. "Find me the slides on project aurora".
// If the user's question doesn't fit into one of the above intents, you must omit the "intent" argument. DO NOT pass in a blank or empty string for the intent argument.
// You have access to two additional operators to help you craft your queries:
// * The "+" operator (the standard inclusion operator for search), which boosts all retrieved documents
// that contain the prefixed term. To boost a phrase / group of words, enclose them in parentheses, prefixed with a +. E.g. "+(File Service)". Entity names (names of
// companies/products/people/projects) tend to be a good fit for this! Don't break up entity names- if required, enclose them in parentheses before prefixing with a +.
// * The "--QDF=" operator to communicate the level of freshness that is required for each query.
// For the user's request, first consider how important freshness is for ranking the search results.
// Include a QDF (QueryDeservedFreshness) rating in each query, on a scale from --QDF=0 (freshness is
// unimportant) to --QDF=5 (freshness is very important) as follows:
// --QDF=0: The request is for historic information from 5+ years ago, or for an unchanging, established fact (such as the radius of the Earth). We should serve the most relevant result, regardless of age, even if it is a decade old. No boost for fresher content.
// --QDF=1: The request seeks information that's generally acceptable unless it's very outdated. Boosts results from the past 18 months.
// --QDF=2: The request asks for something that in general does not change very quickly. Boosts results from the past 6 months.
// --QDF=3: The request asks for something might change over time, so we should serve something from the past quarter / 3 months. Boosts results from the past 90 days.
// --QDF=4: The request asks for something recent, or some information that could evolve quickly. Boosts results from the past 60 days.
// --QDF=5: The request asks for the latest or most recent information, so we should serve something from this month. Boosts results from the past 30 days and sooner.