3 ms·
example: Initial Prompt: "Here is the schema for a database: CREATE TABLE persons ( id INTEGER PRIMARY KEY AUTOINCREMENT, first_name TEXT NOT NULL,
by danielmarkbruce 3y ago
example:
Initial Prompt:
"Here is the schema for a database:
CREATE TABLE persons (
id INTEGER PRIMARY KEY AUTOINCREMENT,
first_name TEXT NOT NULL,
last_name TEXT NOT NULL,
age INTEGER NOT NULL
);
CREATE TABLE Y(blah blah blah)
I'll pose a question and I want you to:
Respond with JSON which has two fields, Query and Error.
Query: A SQL query to get the required information
Error: An error message to pass back to the user if it's not possible.
Question: Show me all the people who are over 40.
"
Response from prompt: {Query: "Select years_old from persons where age > 40", Error:""}
Now, in your "agent":
Get that response, run it against your db, get the error message. Go back to the GPT-4 api with the initial prompt and response, and add "this doesn't work and gives the following error message. Correct your response and responde in JSON again."
And so on.
- deleted 3y ago[deleted]
- Art9681 3y agoPeople who are having trouble getting good results from LLMs are still trying to figure them out. Most folks are using the product and not the model. Where it really shines is when you use the API and build a platform of workflows around it, starting with a real solid prompt template and working your way through various methods to achieve an outcome. There is no magic wand to get a full solution in one shot, but guiding the LLM towards that ultimate outcome is the type of thing a lot of nerds dont have the attention span for and instead move on to the next weekly JS framework to get their fix. Which is good for us who stick with the process.
- danielmarkbruce 3y agoYup, agree.