Skip to main content

Be direct and specific

When communicating with Poolside, as with humans, the clearer the task specification, the likelier it is that it gets solved.
  • When interacting with Poolside, use clear and direct instructions, and avoid ambiguity.
  • For large and complex tasks, avoid ambiguity by breaking down your task into smaller well-specified prompts.
  • If you expect Poolside to produce code changes, prefer to ask it in an imperative manner like “add a function …”, “modify this code to …”, “change the X class to …”.
Original PromptImproved Prompt
I need documentation for this file It’s unclear what form the documentation should be in, and whether you are asking for the information, or want Poolside to add it to the file.Add docstrings with "args" and "return" sections to all methods in this file Specific, and it is clear that code modification is expected.
Add a search function here A lot of ambiguity here that leaves the correct implementation up for interpretation.Add a search endpoint under /books/search/<title> that allows for searching books by a fuzzy match on their title` Some ambiguity is left [for example, how to perform the search], but the task is well specified.
Make this code easier to maintain An ambiguous and fairly complex task that implies multiple sub-tasks.Split the main function into smaller functions Refactor the code to use a class for X instead of passing all values individually Refactor the code to replace the magic values by configurable constants Often you can split complex tasks into multiple concrete steps. If the breakdown is not clear, you can ask Poolside for suggestions, like How could I make this code easier to maintain?

Minimize distracting context

While Poolside is trained to work with large contexts, it can still happen that Poolside will pay attention to context that it thinks is relevant to your question or task, but actually is not. For best performance, minimize irrelevant context that is passed to Poolside.
  • Include only the files relevant to your query in the context. Remove additional files/resources added with @file when they become irrelevant.
  • Start a new conversation [or clear the current one] if the conversation history becomes irrelevant to the current task.
  • Do not enable additional context like errors or application dependencies, if they are not directly relevant to your task.

Working in multi-turn

Poolside has access to the full conversation history within the current conversation. Here are some tips to use this more effectively:
  • Avoid ambiguous references to previous conversation turns. In many contexts, “this”, or “it” can refer to multiple things, and Poolside may not catch which one you mean.
  • Be careful when making code changes in the context files while referring to code changes earlier in the conversation. Code changes suggested by Poolside refer to the state of the context when the response was generated, and it can get confused when current file content does not match the state at the previous turn you’re referring to.
  • A common usage pattern is to use multi-turn to iterate and modify the code suggestions given by Poolside in follow-ups. To avoid cluttering the conversation history, we recommend iterating with Poolside until you get a good answer, apply it and start a new session for the next task.
  • Note that the Regenerate button picks up the conversation history at the turn they were pressed. This means that you can scroll up in the conversation to implement a previous answer.
  • Use /new and /clear to start a new or clean up the current conversation when the conversation history becomes irrelevant or cluttered. Web Assistant Slash Commands

Encourage step-by-step thinking for complex tasks

For more complex tasks, it can be helpful to instruct Poolside to approach the task step by step [“chain of thought”]. This allows Poolside to more carefully consider the task, and produce a more detailed and accurate answer. Note that not all tasks will benefit from this, and is not recommended for simple problems.
For complex tasks, try to add some version of “Think step by step. Share your thoughts at each step.” at the end of the prompt.
Original promptImproved prompt
Add a new TopoSorterclass that implements theSorter interface. While Poolside can succeed on complex tasks directly, answers can be sometimes superficial. For instance, the answer may be only related to making sure the new class adheres to the interface.Add a new TopoSorterclass that implements theSorter interface. Think step by step. Share your thoughts at each step. Encouraging step by step thinking generally leads to a more detailed and in-depth answer for complex tasks.

Trying multiple attempts

Poolside’s responses are generally non-deterministic, and multiple attempts, as well as different formulations of the same prompt can lead to different performance.
  • Use the Regenerate button to regenerate a different answer to the same prompt and conversation history at that point in time.
  • Use follow-up queries to guide Poolside to a better answer, pointing out concrete issues with its previous response.
  • If follow-up queries are not successful, try to /clear the conversation and try again with a differently worded prompt. Again, clear and specific prompts work best.