INITIALIZATION Knowledgebase: ki-dev Base Query: if i were to fix an extraction of a document. how should my prompt be so that LLMs will be able to sift through the extraction and fix all the formatting? Model: gemini-1.5-pro-preview-0409 Use Curl?: None ================================================== QUESTIONING Clarity Score: 10 Give follow-up?: False Follow-up query: ================================================== ROUTING Query type: creative_writing ================================================== RAG PARAMETERS Max Context To Include: 100 Lowest Score to Consider: 0.1 ================================================== VECTOR SEARCH ALGORITHM TO USE Use MMR search?: True Use Similarity search?: False ================================================== PRIMER Primer: You are a highly intelligent personal assistant. Your role is to act as an expert writer. In your responses to enterprise users, prioritize clarity, trustworthiness, and appropriate formality. Be honest by admitting when a topic falls outside your scope of knowledge, and suggest alternative avenues for obtaining information when necessary. Make effective use of chat history to avoid redundancy and enhance response relevance, continuously adapting to integrate all necessary details in your interactions. If the user provides a specific structure for the article or output, please follow it intently. Use as much tokens as possible to provide a detailed response. ================================================== FINAL QUERY Final Query: CONTEXT: """QUERY: if i were to fix an extraction of a document. how should my prompt be so that LLMs will be able to sift through the extraction and fix all the formatting?""" Consider the chat history for relevant information. Use all information included. Use as much tokens as needed. Final Files Sources: ================================================== FINAL ANSWER Answer: To craft a prompt that effectively instructs LLMs to fix formatting errors in a document extraction, you should provide clear instructions and context. Here's a breakdown of how to structure your prompt: **1. Set the Context and Task:** * Begin by clearly stating that you want the LLM to fix the formatting of an extracted document. * Mention that the text might contain formatting errors. **2. Provide Formatting Guidelines:** * Specify the desired formatting style. Be explicit about what "correct" formatting entails. For example: * **General:** "Format the text for improved readability and professional appearance." * **Specific:** "Use a consistent font (Arial, size 12), single line spacing, and remove any unnecessary blank lines. Ensure proper capitalization and punctuation." * If you have specific requirements for headings, bullet points, lists, or other elements, outline them explicitly. **3. Input the Extracted Text:** * Clearly separate the instructions from the text you want to be corrected. * You can use delimiters like: * ``` [Start of extracted text] ... [End of extracted text] ``` * Triple backticks: ``` Your extracted text here. ``` **Example Prompt:** ``` I have an extraction from a document that contains formatting errors. I need you to fix the formatting to make it clear and professional. Please use the following formatting guidelines: * Font: Arial, Size 12 * Line Spacing: Single * Capitalization: Use proper sentence case. * Punctuation: Ensure correct punctuation throughout. * Spacing: Remove any unnecessary blank lines. ``` **Additional Tips:** * **Be Specific:** The more specific your instructions, the better the LLM can understand your requirements. * **Provide Examples (Optional):** If possible, include a short example of the incorrect formatting and the desired output. This can help the LLM understand your expectations better. * **Iterate and Refine:** You might need to experiment with different prompts and instructions to achieve the desired results. Don't hesitate to refine your prompt based on the LLM's output. Remember that LLMs are still under development, and their ability to understand and execute complex formatting tasks can vary. It's always a good idea to review and fine-tune the output to ensure it meets your requirements. ==================================================