[SOLVED] - LangChain Select by maximal marginal relevance (MMR) examples

Hi there,
i don’t know if is the right place to ask but i try.

We are using openai API to perform request to GPT-4 against our context using embeddings.
I would like to perform MMR search provided by LangChain but i can’t fit the exmple provided with my use case.
We have a prompt in which, besed on the similarity query on our vector-db, is present a context composed by a list of all relevant sections.


Answer the question based on the context below.

section 1\n

Question: <a question>\nAnswer:

I don’t understand how to use the PromptTamplate and FewShotPromptTemplate method.
Does anybody have had similar issues?

Solved? Can you share in case someone else has a similar problem in the future?


1 Like

We have abandoned the langchain solution and we did it by ourselves…so, sorry but i don’t remember what was the issue with that library :blush: