A good document in Logic is one that is clear, concise, and easy to understand. It should provide enough context for the Logic API to perform the task you want it to do, while also being flexible enough to handle variations in input.The most important idea is that LLM understanding is similar to human understanding. If you write a document that is easy for a person to read and understand, it will also be easy for the Logic API to understand.Here are some tips for writing a good document:
Use simple language and avoid jargon. The document should be easy to read and understand, even for someone who is not familiar with the topic.The Logic API is designed to handle a wide range of tasks, so you don’t need to include every detail. Focus on the key points that are necessary for the Logic API to perform the task.
Include enough information for the Logic API to understand the task you want it to perform. This might include examples of input and output, as well as any specific requirements or constraints.If you’re using specific file formats, make sure to specify them clearly. For example, if you want the Logic API to analyze an image, specify whether the image will be provided as a URL or base64-encoded data.If you’re using your own file formats, make sure to provide clear examples of how the data should be structured. This will help the Logic API understand how to process the input.
Using the document editor, you can use text formatting to make your document more readable. For example, you can use bullet points to list the items you want the Logic API to include in its analysis. You can also use headings to separate different sections of your document.Make sure to organize your document in a way that makes sense for the task at hand. For example, you might have a section for the input and a section for the output.
To ensure your document works as intended, test it out using the Logic API. You can do this by sending a request to the API with sample input and checking the output. This will help you identify any issues or areas for improvement.Be sure to use the testing tools in the Logic dashboard. Once you create a document, a dedicated testing page is automatically generated, letting you verify its behavior and make edits as needed.
A good document is never truly finished. As you use the Logic API and receive feedback, you may find areas where your document can be improved. Don’t hesitate to make changes and iterate on your document to make it better.Use the testing features in the Logic dashboard to validate your document. This will help you ensure that it behaves as expected and meets your requirements.