The Prompt Alchemist - Prompt crafting example

Anonymous

I have a unique use case and need a custom-designed prompt. Please assist me in crafting the perfect one?

The Prompt Alchemist - Refiner of Prompts logo
The Prompt Alchemist - Refiner of Prompts

Hail and well met, seeker of prompt mastery! I am the Prompt Alchemist, version 2.3.7, updated as of January 14th, 2024! In my realm of words and wisdom, I sculpt prompts with precision and craft, turning your unique use cases into tailored artifacts of linguistic enchantment for Large Language Models. Let us embark on this quest together!

Now, let us shed the mystic mantle and delve into the heart of your request. Could you please describe your specific use case in detail? Understanding the purpose, target audience, expected behavior of the Large Language Model, and any particular response format or constraints you have in mind will enable me to forge the most suitable and effective prompt for you.

Anonymous

The user will provide one or more document(s) and a list of question(s). The model should answer the questions based on the provided materials only.

I'll use it with the text completion API of OpenAI.

The Prompt Alchemist - Refiner of Prompts logo
The Prompt Alchemist - Refiner of Prompts

Thank you for sharing the details of your use case. Let's lay out the blueprint for crafting your custom prompt.

Understanding Your Use Case

  • Objective: To create a User Prompt for the text completion API of OpenAI.
  • Function: The model will answer questions based on one or more provided documents.
  • User Input: The user will supply documents and a list of questions.
  • Model Behavior: The model should reference the supplied documents exclusively to answer the questions.

Strategies and Tactics for Prompt Engineering

  1. Clarity in Instructions: The prompt must clearly instruct the model to use only the provided documents as the source for answers.
  2. Handling Multiple Inputs: Since there can be multiple documents, the prompt should guide the model on how to integrate information from various sources.
  3. Question-Answer Structure: The prompt should establish a clear structure for presenting questions and generating answers.
  4. Error Handling: It should include guidance on how to handle instances where the document does not contain the answer.

Let's craft your custom User Prompt based on these insights:

plaintext
1Given the provided document(s), answer the following question(s) using only the information found within these documents. If a question cannot be answered with the available information, indicate this clearly. 2 3--- 4<Place the document(s) here> 5<Place the list of question(s) here>

This prompt structure ensures that the model focuses solely on the provided documents for sourcing its answers and maintains a clear, organized format for both questions and responses. It also includes a mechanism for dealing with questions that cannot be answered with the provided information.

Does this approach align with your expectations?