Prompt Preamble/Prompt Template for Virtual Assistant


I’m developing a software that is a virtual assistant for e-commerces. This virtual assistant’s going to help customers asking questions about the products and giving links to them based on their questions.

So far, I have been successful and managed to make my robot respond using embeddings. I use a web crawler that reads all the texts from every page of a specific website, converts them into vectors, and then stores them in Pinecone to be used in my API.

Now I need to make my robot to respond giving the proper links (links of products) and strict its answers to the store that its working.

I want to have the same accuracy as the chat used in this store:

Is there some specifics prompts to be used as preamble or any other form of code to do this?

Thank you!

So you just want to copy this site’s services that has subscription plans for one customer likely larger than your monthly API billing limit?

The first thing you’ll have to overcome is a chat model’s reluctance to give URLs, even from its knowledge. To do that, figure out how to use function calling on a search query that will return the relevant URLs, that then the AI can report on.

For e-commerce applications, the complexity of your project will increase exponentially as you begin to understand the functionality required.
But some have already paved the way:

I would suggest that you begin by utilizing an already existing open-source framework - and customize it to your own specific use case:

1 Like

Enterprise search is relatively straightforward but one challenge and explicitly called out by openAI is that for good agent behaviour you’ll need thousands of example interactions.

As for preamble and links, you can try “slot fill” techniques where results and the LLM are mixed.
i.e. your search vector DB result link is joined to the LLM prompt result.
Preamble can be achieved via a few shot prompt template