<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Aura – </title>
    <link>/docs/atria/capabilities/llm-experiences-builder/rag/</link>
    <description>Recent content on Aura</description>
    <generator>Hugo -- gohugo.io</generator>
    <language>en</language>
    
	  <atom:link href="/docs/atria/capabilities/llm-experiences-builder/rag/index.xml" rel="self" type="application/rss+xml" />
    
    
      
        
      
    
    
    <item>
      <title>Docs: </title>
      <link>/docs/atria/capabilities/llm-experiences-builder/rag/general-rag/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>/docs/atria/capabilities/llm-experiences-builder/rag/general-rag/</guid>
      <description>
        
        
        &lt;h1 id=&#34;general-rag-capability&#34;&gt;General RAG capability&lt;/h1&gt;


&lt;div class=&#34;pageinfo pageinfo-primary&#34;&gt;
&lt;p&gt;Overview of the &lt;strong&gt;General RAG&lt;/strong&gt; capability, encompassing the underlying technology, its application in &lt;em&gt;&lt;strong&gt;ATRIA&lt;/strong&gt;&lt;/em&gt; and the benefits derived from its use&lt;/p&gt;
&lt;p align=&#34;left&#34;&gt;
  &lt;img width=&#34;250&#34; height=&#34;250&#34; src=&#34;../../../../../images/atria/technical-skills-1.png&#34;&gt;
&lt;/p&gt;

&lt;/div&gt;

&lt;h2 id=&#34;application-in-atria-general-rag&#34;&gt;Application in ATRIA: General RAG&lt;/h2&gt;
&lt;p style=&#34;background: #e2f8ff; color: #220183; font-weight: normal; padding: 15px; border: 1px solid #0710e6; border-radius: 6px;&#34;&gt; &lt;b&gt;ATRIA&lt;/b&gt; enables the generation of &lt;b&gt;generic questions experiences (use cases)&lt;/b&gt; to resolve users&#39; requests expressed in natural language and based on FAQs by supporting &lt;b&gt;complex calls to AI models&lt;/b&gt;.&lt;br&gt; This is done through the integration of a predefined &lt;b&gt;RAG (Retrieval Augmented Generation) chain &lt;/b&gt; while guaranteeing &lt;b&gt;security and privacy in interactions&lt;/b&gt;.  &lt;/p&gt;
&lt;p align=&#34;center&#34;&gt;
  &lt;img width=&#34;700&#34; height=&#34;700&#34; src=&#34;../../../../../images/atria/atria-rag-intro.png&#34;&gt;&lt;br&gt;
  &lt;i&gt;Figure 13. General RAG in ATRIA&lt;/i&gt;
&lt;/p&gt;
&lt;p&gt;The predefined RAG chain defined in &lt;em&gt;&lt;strong&gt;ATRIA&lt;/strong&gt;&lt;/em&gt; is called &lt;em&gt;&lt;strong&gt;General RAG&lt;/strong&gt;&lt;/em&gt;. It includes additional steps that overcome the potential of Retrieval Augmented Generation technologies by optimizing the input prompt and generating more accurate responses. See details in section &lt;a href=&#34;#functional-overview&#34;&gt;Functional overview&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;In upcoming versions, constructors will be able to design their own LLMs chains based on RAG.&lt;/p&gt;
&lt;h3 id=&#34;interaction-with-atria-general-rag-capability&#34;&gt;Interaction with ATRIA General RAG capability&lt;/h3&gt;
&lt;p&gt;This service is &lt;strong&gt;accessible via API&lt;/strong&gt;, enabling its consumption both from Aura Platform and any external application.&lt;/p&gt;
&lt;h3 id=&#34;current-available-models&#34;&gt;Current available models&lt;/h3&gt;
&lt;p&gt;The AI-driven models currently integrated into &lt;em&gt;&lt;strong&gt;ATRIA&lt;/strong&gt;&lt;/em&gt; are included &lt;a href=&#34;../../../../../docs/atria/capabilities/llm-experiences-builder/#models-currently-integrated-into-atria&#34;&gt;here&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id=&#34;functional-overview-of-general-rag&#34;&gt;Functional overview of General RAG&lt;/h2&gt;
&lt;p&gt;The use of the General RAG capability encompasses three different stages:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Data ingestion&lt;/strong&gt;, that includes uploading the knowledge bases used for lexical (keywords) and semantic search (embeddings) search. &lt;br&gt;
Discover the underlying processes for that in the document &lt;a href=&#34;../../../../../docs/atria/technical-guidelines/configuration/import-documents/&#34;&gt;Import documents into *&lt;strong&gt;ATRIA&lt;/strong&gt;&lt;/a&gt;, as well as tips for data curation, a process recommended before the documents uploading.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;RAG chain&lt;/strong&gt;: If a request enters &lt;em&gt;&lt;strong&gt;ATRIA&lt;/strong&gt;&lt;/em&gt;, the General RAG capability executes the predefined steps in its chain, which are described in the following figure.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Aura answer&lt;/strong&gt;: The generated response is sent to the user.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p align=&#34;center&#34;&gt;
  &lt;img width=&#34;900&#34; height=&#34;900&#34; src=&#34;../../../../../images/atria/general-rag-steps.png&#34;&gt;&lt;br&gt;
  &lt;i&gt;Figure 14. General RAG stages&lt;/i&gt;
&lt;/p&gt;
&lt;p&gt;Making a zoom in the stages of the General RAG pipeline, the following steps are included:&lt;/p&gt;
&lt;br&gt;  
   &lt;p align=&#34;center&#34;&gt;
  &lt;img width=&#34;1000&#34; height=&#34;1000&#34; src=&#34;../../../../../images/atria/general-rag-pipeline.png&#34;&gt;&lt;br&gt;
  &lt;i&gt;Figure 18. General RAG chain&lt;/i&gt;
&lt;/p&gt;
&lt;br&gt;
&lt;ol&gt;
&lt;li&gt;Security: the request is analyzed to improve security and prevent prompt injection.&lt;/li&gt;
&lt;li&gt;Multi-language: The multi-language feature allows users to receive responses in their own language. The system automatically detects the language in the user&amp;rsquo;s request in the multi-language step of the RAG pipeline, and this language is afterwards used in the response generation stage to provide the response back to the user.&lt;/li&gt;
&lt;li&gt;Conversation history: If there is information from previous interactions, they are now analyzed to check if they are relevant for the current query. In this case, the query is rewritten using this context information.&lt;/li&gt;
&lt;li&gt;Retrieval: Lexical and semantic retrieval from databases that return text blocks with key information to compose the response.&lt;/li&gt;
&lt;li&gt;Post-filtering: The retrieved text blocks are compared with the user query to determine if they are relevant or not to answer the question.&lt;/li&gt;
&lt;li&gt;Response generation: If so, the fragments are reordered and used to compose an augmented prompt which is resolved through LLMs technology.&lt;/li&gt;
&lt;/ol&gt;
&lt;h2 id=&#34;benefits-from-the-use-of-atria-general-rag&#34;&gt;Benefits from the use of ATRIA General RAG&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;The General RAG predefined chain enables all the advantages of RAG technologies to the resolution of use cases. Specifically for generic questions use cases based on FAQs.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Moreover, General RAG capability integrates other extra features that lead to more accurate responses:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Features to avoid prompt injection&lt;/li&gt;
&lt;li&gt;Conversation history&lt;/li&gt;
&lt;li&gt;Filtering steps&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;The use of Retrieval Augmented Generation techniques enables the use of continually updated information, every time an up-to-date knowledge base is uploaded into the system.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;generative-feedback-functionality&#34;&gt;Generative feedback functionality&lt;/h2&gt;
&lt;p&gt;When testing how Generative AI/RAG capabilities work with the &lt;em&gt;&lt;strong&gt;ATRIA&lt;/strong&gt;&lt;/em&gt; web interface &lt;a href=&#34;../../../../../docs/atria/technical-guidelines/atria-web-interface/&#34;&gt;aura-manager&lt;/a&gt;, it is possible to use the &lt;strong&gt;feedback functionality&lt;/strong&gt; to estimate the user&amp;rsquo;s satisfaction regarding the quality and appropriateness of the generated answer to her request. This can be done easily by clicking the thumbs-up or thumbs-down icons.&lt;/p&gt;
&lt;p&gt;&lt;i class=&#34;fa-regular fa-file-lines fa-xl&#34; style=&#34;color: #0d5de7;&#34;&gt;&lt;/i&gt; &lt;strong&gt;Do you need a more detailed explanation on how Generative feedback capability works?&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Access the document &lt;a href=&#34;../../../../../docs/atria/atria-functional-description/generative-feedback-functional-overview/&#34;&gt;Generative feedback functional description&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Access the document &lt;a href=&#34;../../../../../docs/atria/technical-guidelines/atria-web-interface/&#34;&gt;Use &lt;em&gt;&lt;strong&gt;ATRIA&lt;/strong&gt;&lt;/em&gt; web interface (aura-manager)&lt;/a&gt; to discover how to utilize this functionality.&lt;/li&gt;
&lt;/ul&gt;

      </description>
    </item>
    
    <item>
      <title>Docs: </title>
      <link>/docs/atria/capabilities/llm-experiences-builder/rag/sql-rag/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>/docs/atria/capabilities/llm-experiences-builder/rag/sql-rag/</guid>
      <description>
        
        
        &lt;h1 id=&#34;aura-sql-rag-pipeline&#34;&gt;Aura SQL RAG pipeline&lt;/h1&gt;


&lt;div class=&#34;pageinfo pageinfo-primary&#34;&gt;
&lt;p&gt;Description of the SQL RAG pipeline&lt;/p&gt;

&lt;/div&gt;

&lt;h2 id=&#34;introduction&#34;&gt;Introduction&lt;/h2&gt;
&lt;p&gt;&lt;em&gt;&lt;strong&gt;ATRIA&lt;/strong&gt;&lt;/em&gt; currently integrates one RAG pipeline for the conversion of a request from natural language to an SQL query.&lt;/p&gt;
&lt;h2 id=&#34;steps-in-the-sql-rag-chain&#34;&gt;Steps in the SQL RAG chain&lt;/h2&gt;
&lt;p&gt;The use of the &lt;em&gt;&lt;strong&gt;SQL RAG&lt;/strong&gt;&lt;/em&gt; chain encompasses different stages, which are explained and schematically represented below.&lt;/p&gt;
&lt;p align=&#34;center&#34;&gt;
  &lt;img width=&#34;1200&#34; height=&#34;1200&#34; src=&#34;../../../../../images/atria/sql-rag-chain.png&#34;&gt;&lt;br&gt;
  &lt;i&gt;Figure 15. SQL RAG chain&lt;/i&gt;
&lt;/p&gt;
&lt;h3 id=&#34;1-injection-checking&#34;&gt;1. Injection checking&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Detects the presence of anomalies in the user&amp;rsquo;s query that may affect the resolution process.&lt;/li&gt;
&lt;li&gt;Currently, a set of checks, based on heuristics, are made:
&lt;ul&gt;
&lt;li&gt;Detects overly long questions.&lt;/li&gt;
&lt;li&gt;Detects suspicious substrings in the query.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&#34;2-question-translation-currently-deactivated&#34;&gt;2. Question translation (currently deactivated)&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Optional step for the translation of the user&amp;rsquo;s query into English.&lt;/li&gt;
&lt;li&gt;Currently, it is not activated.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&#34;3-candidate-table-retrieval&#34;&gt;3. Candidate table retrieval&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;The system searches the candidate tables for relevant documents. This is currently done using a hybrid search, through the combination of lexical and semantic search (embeddings).&lt;/li&gt;
&lt;li&gt;The table retrieval is currently based on the similarity between the user&amp;rsquo;s query and the tables high level description.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&#34;4-sql-query-generation&#34;&gt;4. SQL query generation&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;The top-2 results (tables) are selected.&lt;/li&gt;
&lt;li&gt;In them, the user&amp;rsquo;s request is converted from natural language to an SQL query.&lt;/li&gt;
&lt;/ul&gt;

      </description>
    </item>
    
  </channel>
</rss>
