Vertex AI Gemini FAQ support

118 Views Asked by At

Can anyone tell me how to train Gemini via vertex in GCP? I'm trying to create a customer service bot based on an FAQ that I have written which will act as the knowledge base for the bot.

I tried looking at custom data in vertex but text based data doesn't seem to be allowed to be created and I am unsure if this is even the correct direction.

1

There are 1 best solutions below

0
On

If your FAQ is small in size, a straightforward solution can be achieved by simply embedding the FAQ into your prompt. Gemini Pro has a 32k context window. Example:

The FAQ contents are:
<Insert FAQ contents>

Please answer the user's question if it is addressed by the FAQ:
<Insert user question>

Alternatively, you could consider a RAG (Retrieval Augmented Generation) solution. You could index your FAQ documents into text embeddings. You could then write a chain which does a similarity search of the user's question against FAQ content, returning the most similar documents. Here's an example notebook that covers RAG with Gemini on Vertex AI.