From fb8f1f4d69179cf58de9eab7c356552da2fa8366 Mon Sep 17 00:00:00 2001 From: Bob Kozdemba Date: Thu, 6 Feb 2025 15:04:18 -0600 Subject: [PATCH] updated --- .../modules/ROOT/pages/02-architecture.adoc | 8 +++- .../modules/ROOT/pages/04-workshop.adoc | 41 +++++++++++++++---- .../ROOT/pages/developer-resources.adoc | 3 +- 3 files changed, 41 insertions(+), 11 deletions(-) diff --git a/documentation/modules/ROOT/pages/02-architecture.adoc b/documentation/modules/ROOT/pages/02-architecture.adoc index f90d5d4..c5c74a5 100644 --- a/documentation/modules/ROOT/pages/02-architecture.adoc +++ b/documentation/modules/ROOT/pages/02-architecture.adoc @@ -75,7 +75,13 @@ image::rag-architecture.jpg[width=100%] === Architecture -=== Ingest Engine +==== Ingest Engine + +The ingest engine consists of a caching proxy and syncronizer services. The caching proxy is a Camel service that +caches the stock information from the Alpha Vantage API and the syncronizer service is a Camel service that +synchronizes the data with the Weaviate vector database. The ingest engine is deployed on Openshift using a standard +source-to-image workflow. Details can be found in the https://github.com/joshdreagan/av-caching-proxy.git[caching proxy] +and https://github.com/joshdreagan/av-overview-sync.git[syncronizer] repositories. ==== Weaviate vector database The Weaviate vector database is installed using the helm installer which allows for enterprise features to be enabled including diff --git a/documentation/modules/ROOT/pages/04-workshop.adoc b/documentation/modules/ROOT/pages/04-workshop.adoc index a5673e7..8192953 100644 --- a/documentation/modules/ROOT/pages/04-workshop.adoc +++ b/documentation/modules/ROOT/pages/04-workshop.adoc @@ -118,15 +118,38 @@ consuming when more than one company must be analyzed not to mentioned that the and could change several times day. This is where AI can help. In this workshop, we will make use of a vector database and an LLM to give the analyst a head start on the task at hand. -==== Review the dataflow diagram to explain the workflow. -TODO -==== Review the architecture diagram to explain the Openshift services. -TODO +==== Openshift services. -==== Run the RAG application. -TODO +===== Weaviate +At the center of the architecture is the Weaviate vector database. It it is deployed as an OpenShift +statefulset to provide resilency and performance. The Weaviate vector database is exposed as a RESTful API via +the internal service network to allow neighboring services such as the syncronizer and intelligent query clients +to interact with it. - * Try different search terms and see how the results change. - * Vary the limits and see the different number of returned results. - * Try different LLM prompts. +===== Ingest Engine + +The ingest engine consists of a caching proxy and syncronizer. Once these services are started, the Weaviate vector database is +initialized with a collection of 7118 stock symbol objects from a https://github.com/joshdreagan/av-overview-sync/blob/master/src/main/resources/data/company-overview.json[local file cache]. +As symbols are ingested, they are converted to vectors via the vectorizer model and upserted into Weaviate as embeddings. +Once this cold start sequence is complete, the syncronizer will periodically refresh a number of stock symbols. This +list of symbols of interest is may be configured at run time. Notice that the entire ingest engine +is highly configurable via https://github.com/joshdreagan/av-overview-sync/blob/master/src/main/jkube/configmap.yml.template#L7[Openshift configmaps]. + +===== Ollama Model Server +The Ollama model server hosts a vectorizer and a large language model. To provide optimal performance and latency +it is accelerated by GPUs. + +===== Developer IDE +Code assistance, debugging and enhanced developer experience is made possible by Openshift DevSpaces. + +==== Running the RAG application. +To run the itelligent application visit the `rag` route in a web browser. Start off near the top of the web page UI +by performing a semantic search using terms like "computers" or "commodities" and see the results. Also feel free +to try a term of your own. +The number of results can be changed using the horizontal slider. Weaviate will return the closest matches but only +the company names will appear in the UI. + +Now choose a prompt template near the bottom half of the UI. This is where the magic happens. The Weaviate +SDK will fill-in the prompt template with the results of the semantic search and perform a generative search using the +power of the LLM. Again, experiment with your own prompts and have fun! diff --git a/documentation/modules/ROOT/pages/developer-resources.adoc b/documentation/modules/ROOT/pages/developer-resources.adoc index 0be828f..53e9c20 100644 --- a/documentation/modules/ROOT/pages/developer-resources.adoc +++ b/documentation/modules/ROOT/pages/developer-resources.adoc @@ -7,7 +7,8 @@ = Developer Resources == Deployment -* https://github.com/redhat-na-ssa/demo-ai-weaviate[The git repo of the source code] +* https://github.com/redhat-na-ssa/demo-ai-weaviate[The git repo of the source code] is a great starting +point to get this example installed and deployed on Openshift == Further reading * https://www.redhat.com/en/blog/building-powerful-applications-weaviate-and-red-hat-openshift-retrieval-augmented-generation-workflow[A blog post related to running vector databases on Red Hat Openshift]