Blog 9
May 5, 2025
This week, I focused on connecting the final stage of my RAG pipeline: integrating the OpenAI API to handle the user query and generate refined search prompts. The goal was to take a user’s natural question, pass it to the API to rephrase or enhance it into a more structured query, and then use that version to search my FAISS vector database.
I wrote code that takes the user’s input, sends it to OpenAI’s model via API, and receives a more targeted query in return. This query is then converted into an embedding using the same sentence-transformer model I used earlier. The embedding is searched against the FAISS index (2020–2025), and the closest matching patents are returned.
This step was critical because it brings the system together: human input, AI-enhanced querying, and accurate retrieval. Next week, I’ll begin working on formatting and presenting the results in a clear way potentially through a small API or front-end interface. This part really demonstrated how powerful the combination of LLMs and vector databases can be for real-world search systems.
Leave a Reply
You must be logged in to post a comment.