Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion documentation/modules/ROOT/pages/02-architecture.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
41 changes: 32 additions & 9 deletions documentation/modules/ROOT/pages/04-workshop.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -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!
3 changes: 2 additions & 1 deletion documentation/modules/ROOT/pages/developer-resources.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down