alan-turing-institute / reginald

Reginald repository for REG Hack Week 23
3 stars 0 forks source link

Re-explore use of agent-based chat engine #126

Open rwood-97 opened 10 months ago

rwood-97 commented 10 months ago

At the moment we use the context chat engine which forces Reginald to always search through our database to find relevant information and answer based on that. In llama-index, there is also a ReAct chat engine which takes your question and then uses an LLM to decide whether to search the database or just use existing 'knowledge' (i.e. data it was trained on). We think this decision is made based on the question only (i.e. nothing to with the contents of the database). We tried the ReAct chat engine with llama2 but weren't super happy with its decision-making on whether to search/not search. See #64 .

We think it would be nice to re-explore the agent-based chat engines and/or using both database and prior knowledge. In particular, it would be good to have a set up of:

  1. query database,
  2. formulate answer,
  3. check if answer answers question and make decision of whehter to reply, query again or use knowledge,
  4. reformulate answer
  5. check if answer answers question,
  6. reply or say 'i dont know'

Potential options are: