Table of contents
Official Content
  • This documentation is valid for:

Here is a step-by-step guide on how to use RAG Assistants, upload a document, and start chatting with the assistant from the Playground.

Step 1: Create New

First, enter the GeneXus Enterprise AI backoffice. On the left side of the screen, you can find the backoffice menu. In this menu, click 
on RAG Assistants.

Next, in the Project Dynamic Combo Box, select the project you want to work with (in this case, the Default one is used).

HowtoRAGAssistant

By default, when opening the RAG Assistants section, a RAG Assistant named Default is displayed.

Create a New RAG Assistant by clicking on the CREATE NEW button.

HowtoRAGAssistant1

After you click on the CREATE NEW button, a window will appear to enter a Name and Description:

HowtoRAGAssistant2

Use the Based on option if you want to copy the configuration from another RAG Assistant. Notice that Documents are not considered, just configuration.

Next, click on the CONFIRM button.

Step 2: Upload documents

To add documents, go to the RAG Assistants home page and click on ADD DOCUMENTS.

HowtoRAGAssistant4

This will open a window similar to the one below. Click on the Add files button to upload files; check the supported formats here.

In addition, it is possible to add metadata by clicking on New row.

HowtoRAGAssistant5

Note: Each file must not exceed 100 MB. In addition, it is possible to upload up to 100 files simultaneously.

 

Metadata (Optional)

The format is a key/value configuration for each row. For example:

Name: 'year'
Value: 2003

Later, during the retrieval process, it is possible to filter according to specific metadata. Possible options are:

Finally, click on START UPLOAD to upload the document.

Step 3: Playground

Finally, you can test your RAG Assistant by clicking on Playground on the left side menu of the Backoffice window:

HowtoRAGAssistant11

In the following image, you can see it running:

HowtoRAGAssistant12

Sources

At the end of the page, the Sources section is displayed. This section includes the document links used to construct the answer:

  • A temporary link to the files is provided if no url metadata is set; check here for more detail.
  • The link will remain valid for 6 days.

Other configurations

Set RAG Assistants

Once the RAG Assistant is created, you return to the main page that provides the UPDATE option. This option allows you to customize the RAG Assistant to your needs.

HowtoRAGAssistant3

For more information, see: RAG Assistants section.

Customize Index

This section allows you to configure indexes, which are essential for structuring unstructured documents so that LLMs can optimally interact with them.

To configure Indexes to your needs, go to the RAG Assistants main page and click on INDEX.

HowtoRAGAssistant6

If you want to configure the default values taken by Index, click on UPDATE:

HowtoRAGAssistant7

To customize the Chunk Size, Chunk Overlap, and Extra Chunks values, take into account that these parameters are critical to tailor LLM processing to your specific needs.

The default settings include the maximum character limit per chunk and the number of overlapping characters between adjacent chunks. Modifying these values allows you to adjust the document partitioning process according to your preferences and application requirements.

Note: Keep in mind that if you make changes to the chunks configuration, you must re-ingest the documents so that GeneXus Enterprise AI takes the new configuration into account. To do so, delete the existing documents and upload a new one. 

In addition, you can explore additional partitioning strategies using the Extra Chunks element. This component gives you the flexibility to add additional chunks and test different configurations to determine the most effective partitioning strategy in your specific case.

For example, if you wish to add two additional chunks, you can populate the Extra Chunks parameter as shown below:

[
  {
      "chunkSize":500,
      "chunkOverlap":80
  },
  {
      "chunkSize":3000,
      "chunkOverlap":100
  }
]

In this case, each document will be chunked three times and ingested separately. Later on, when querying you can change the default namespace by appending the extra chunkSize value.

To save the changes, click on CONFIRM.

View documents

To view the documents and the details of each one, go to the RAG Assistants home page and click on VIEW DOCUMENTS.

HowtoRAGAssistant8

In the specific case of MyRagAssistant, only one document called IRT is available. Here, you can click on the document name (IRT) to access its details or, if you prefer, delete the document.

HowtoRAGAssistant9

By clicking on the document name, in this case IRT, you will find two subsections: General and Metadata

In the General section, you can view the following information:

HowtoRAGAssistant10

By clicking on Document Url, you can view/download the document.

By clicking on Chunks, you can view/download the internal document associated to the chunking process.

In the Metadata section, you can view the following information:

Metadata Name: IRT
Metadata Value: 2015

RAG Cleanup

To delete all documents loaded in your RAG, go to the RAG Assistant home page and click on the CLEANUP option.

HowtoRAGAssistant13

Clicking CLEANUP starts a process that permanently deletes all files, clears the associated vectorstore namespace and updates the relevant information in the RDS (Relational Database Service). 

The CLEANUP process essentially "wipes the slate clean" by removing all traces of your uploaded documents. Use this option with caution, as it cannot be undone.

Last update: September 2024 | © GeneXus. All rights reserved. GeneXus Powered by Globant