ML functions
 
Loading...
Searching...
No Matches
RAG.h File Reference

Implementation of a Retrieval-Augmented Generation (RAG) function for machine learning. More...

#include <faiss/Index.h>
#include <faiss/IndexFlat.h>
#include <cmath>
#include <iostream>
#include "BaseFunction.h"

Go to the source code of this file.

Classes

class  RAG
 Implements a Retrieval-Augmented Generation (RAG) function for machine learning. More...
 

Functions

std::vector< float > flatten (const std::vector< std::vector< float > > &vec2D)
 Flattens a 2D vector into a 1D vector.
 

Detailed Description

Implementation of a Retrieval-Augmented Generation (RAG) function for machine learning.

Function Documentation

◆ flatten()

std::vector< float > flatten ( const std::vector< std::vector< float > > & vec2D)

Flattens a 2D vector into a 1D vector.

Parameters
vec2DThe 2D vector to flatten.
Returns
A 1D vector containing all elements of the input 2D vector.