From TF-IDF to E5-small — Shaping an AI System by Replacing Components
Learning from mistakes while making new ones 😉
Published in
9 min readOct 4, 2024
In Part-1, we built a RAG system that worked alright for a small document and straightforward queries that did not require context to be taken into account.
Later on, when queries got a little tricky, we had to upgrade the way we created embeddings.
The entire thought process, mistakes and model considerations are documented in this part.
query -> who won maximum silver in 2024 olympics?
Gemma response :
{"id":null,"data":{"response":"This information is not available. The 2024 Olympics have not yet taken place."},"error":null,"usage":{"completion_tokens":34,"prompt_tokens":234,"total_tokens":268},"raw_response":"```json\n{\n\"response\": \"This information is not available. The 2024 Olympics have not yet taken place.\"\n}\n```","metadata":null}
gpt-4o-mini response:
{"id":"chatcmpl-AEHqKHkuvqO3oAuYYcwSxITK7eof6","choices":[{"finish_reason":"stop","index":0,"logprobs":null,"message":{"content":"As of my last training cutoff in October 2023, the 2024 Paris Olympics have not yet taken place. Therefore, I cannot provide information on which country won the maximum silver…