A) Create Knowledge Base
Step 1: Authenticate with OpenAI
Search, drag and drop OpenAI Authenticator, add the flow variable connection from the Credential Configuration node. Configure the node by selecting "credentials", then execute.
Step 2: Select embedding model to create vectors
Search, drag and drop OpenAI Embedding Connector node and execute with default settings. This will pick the AI embedding model "text-embedding-ada-002" to create vectors from the input sentences.
Step 3: Divide PDF text into sentences
Search, drag and drop Sentence Extractor node and execute on the column "Document" from the "PDF Parser" node. This will split the document cell in multiple rows: one row for each sentence. Then use a Row Filter node to remove all sentences below 5 terms.
Step 4: Create the vector store
Search, drag and drop FAISS Vector Store Creator node, connect to the OpenAI Embeddings Connector and your string sections output. Execute the node on the column with the strings to create the vector store.
Step 5: Save the vector store
Save the vector store by adding a Model Writer node. To save properly you can use a relative path: selected "Relative to" then "Workflow Data Area" and specify the name of the vector store such as "vector_store.model"