Posts

Showing posts from March 23, 2024

[Day 82] Looking for better parsing methods and prompting techniques for my PDF RAG

Image
 Hello :) Today is Day 82! A quick summary of today: looked online for better ways to prompt gemma-2b-it switched to llama parser for my pdf preprocessing step (wip) All is on this github repo . Firstly, about the prompting techniques Before switching my base prompt, I went back to reduce the chunk_size of the langchain recursiveTextSplitter to values between 250~800. I settled on 800, thinking that 1500 is an overkill, and I saw a little improvement in the responses on the base questions. The custom query list and base prompt at this point were: And answer to the queries: Next, I decided to see the results to the outputs, if I change the base prompt a bit. The above prompt was modified by adding  'You are a helpful assisstant to customers about our bank's terms and conditions.' And at the end, I saw that we can add these special tokens to tell the model to differentiate better between user and model's turn to respond. User query: <start_of_turn>user{query}<end