Second question : in order to correct wrong answers or "I don’t know" answers, I would like to allow my users to enter the correct response in a streamlit text area:
correction = st.text_area("A mistake ? Correct me here.")
correct_button=st.button('Send')
if (correct_button==True):
new_document = Document(
text=correction,
metadata={"correction": "True"},
)
index.insert(document = new_document)
index.storage_context.persist()
query_engine = index.as_query_engine()
This code snippet doesn’t seem to work though. The index is updated, I can see the new document in it. But the chatbot keeps saying it doesn’t know the answer to the question.