A question about AI and structured data (numbers)

This is what I’m building: an app for a venue with bands and gigs and dates and times.
In a table i have the columns | name | date | time | bio |
In the app I want the customer to get answers on questions like:

  • Is X playing in the venue?
  • When is Y playing in the venue?
  • What time is Z on stage?

I realize of course that OpenAI is a large language model and not specialized in numbers. So because of that sometimes the answer is good and sometimes the answer is wrong. Both date and time.

Is this a matter of better prompting? Is there another way to get the right answer when asking about things numbers involved?

You could try feeding the name, date, time and bio into the prompt field via a template column. Then instruct GPT to only reply based on the info provided.

1 Like

Ah, great idea!

1 Like

My pleasure! With so many AI columns to choose from it’s difficult to say which is the best. I mostly fall back on GPT with history or GPT without history.

Hope that helps!

The Template works like a charm. Cool. The only question that doesn’t work (yet) is ‘who is playing today’ but this is a very good start.

1 Like

Glad to hear! Maybe you could do something in the backend if date is within today then = “playing today”… and on the front end if date entered is within today then = “playing today”… then check the text values

I’m sure you’ll think of something :wink:

Yeah, I’m on a roll :slight_smile: Thanks.

1 Like

:drum:

OpenAI, and LLMs in general, won’t do pretty well on their own when you feed terms like “today”, “last week”, “last month” etc.

I think a good practice is to feed them some options to learn, what they call “few-shot learning”. You can add something like a template to your prompt:

“Today is Aug 4, 2023
Because this month is August 2023, last month is July 2023
Because this year is 2023, last year is 2022
Because today is Aug 4, yesterday is Aug 3”

It would give it a better sense of what to do, and why it leads to that conclusion (chain-of-thought prompting).

3 Likes

This is a great suggestion, ThinhDinh, so far I’ve been making if this then that columns with ‘today’ and ‘this week’ and using that in the template too. Makes still strange mistakes though, but I’m going to add this to the recipe! Thanks!

2 Likes

Here are some further examples:

4 Likes

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.