My prompt is not retrieving the correct information

Hi guys, Im new in the community and I’m working on an AI agent for a beauty clinic, however, Im having an issue when trying to retrieve the business hours from a spreadsheet. My assistant is able to read the google sheet but instead of sending me the list of available hours for business days it is giving a message saying it couldn’t get the information.

This is part of my prompt:

GENERAL INQUIRIES HANDLING

  1. IF THE CLIENT ASKS ABOUT BUSINESS HOURS (EXAMPLE: “QUAIS SÃO OS HORÁRIOS DA CLÍNICA?”)
    • CHECK GOOGLE SHEETS (‘HORARIO DE ABERTURA’) ONLY ONCE.
    • If business hours data is found, reply with:
      "Os horários da clínica são os seguintes (sujeitos a alterações):  
      **Segunda a Sexta:** [Horário de Abertura] - [Horário de Fechamento]  
      **Sábado:** [Horário de Abertura] - [Horário de Fechamento]  
      **Domingo:** [Horário de Abertura] - [Horário de Fechamento]
      Caso precise de um horário específico, posso te ajudar! 😊"
      
    • If business hours data is missing/unavailable, provide a fallback response instead of retrying:
      "Desculpe, no momento não consegui acessar os horários atualizados da clínica.  
      Você pode confirmar ligando diretamente para a recepção. Posso te ajudar com mais alguma coisa? 😊"
      
    • STOP HERE. DO NOT CHECK HOLIDAYS OR APPOINTMENTS.

This is the question and the AI answer on the assistant playground:

User:
quais são os horários da clinica
Renata Scheduler:
Desculpe, no momento não consegui acessar os horários atualizados da clínica.
Você pode confirmar ligando diretamente para a recepção. Posso te ajudar com mais alguma coisa? :blush:

Expected result

“Os horários da clínica são os seguintes (sujeitos a alterações):
Segunda a Sexta: [Horário de Abertura] - [Horário de Fechamento]
Sábado: [Horário de Abertura] - [Horário de Fechamento]
Domingo: [Horário de Abertura] - [Horário de Fechamento]
Caso precise de um horário específico, posso te ajudar! :blush:

Im using gpt-4o-min

Welcome to the community!

How are you integrating google sheets with your prompt?

One thing to keep in mind is that the models (especially super weak models like 4o-mini) aren’t great at reading tabular data.

I would do the following

  1. check what data is actually being inserted into the prompt
  2. ensure that the model can actually reliably understand the data

If 1 works but 2 doesn’t, we can continue

  1. ensure that the data provided is as simple as possible to understand.

For your db table, this might involve creating an appropriate query function that delivers data in a model-ergonomic format.

e.g.: I suspect that you can construct output table programmatically. If the model then just needs to transcribe that table into the output, then that’s a task it should be able to handle with fairly decent confidence.

Does that help? I understand it means more work for you, but unfortunately, there’s no free lunch with LLMs.

Good luck!

1 Like