resp = llm.complete("You have access to a database of tax information. Rewrite the following user query to improve search results.\nQuery: ...\nRewritten Query: "
I don't think there's really an offline solution here. Maybe fine-tuning embeddings? Or adding metadata to your documents to help with embeddings or filtering?