Skip to content

Commit

Permalink
Merge pull request #36 from dbkinder/main
Browse files Browse the repository at this point in the history
publish latest
  • Loading branch information
dbkinder authored Sep 21, 2024
2 parents dda9b17 + 65b7a33 commit 13b7af0
Show file tree
Hide file tree
Showing 45 changed files with 169 additions and 175 deletions.
10 changes: 3 additions & 7 deletions latest/GenAIComps/README.html
Original file line number Diff line number Diff line change
Expand Up @@ -757,13 +757,9 @@

<div itemprop="articleBody">

<div align="center">
<section id="generative-ai-components-genaicomps">
<section id="generative-ai-components-genaicomps">
<h1>Generative AI Components (GenAIComps)<a class="headerlink" href="#generative-ai-components-genaicomps" title="Link to this heading"></a></h1>
<p align="center">
<b>Build Enterprise-grade Generative AI Applications with Microservice Architecture</b>
</p>
<div align="left">
<p><strong>Build Enterprise-grade Generative AI Applications with Microservice Architecture</strong></p>
<p>This initiative empowers the development of high-quality Generative AI applications for enterprises via microservices, simplifying the scaling and deployment process for production. It abstracts away infrastructure complexities, facilitating the seamless development and deployment of Enterprise AI services.</p>
<section id="genaicomps">
<h2>GenAIComps<a class="headerlink" href="#genaicomps" title="Link to this heading"></a></h2>
Expand Down Expand Up @@ -1025,7 +1021,7 @@ <h2>Additional Content<a class="headerlink" href="#additional-content" title="Li
<ul class="simple">
<li><p><a class="reference internal" href="../community/CODE_OF_CONDUCT.html"><span class="std std-doc">Code of Conduct</span></a></p></li>
<li><p><a class="reference internal" href="../community/SECURITY.html"><span class="std std-doc">Security Policy</span></a></p></li>
<li><p><a class="reference internal" href="#/LEGAL_INFORMATION.md"><span class="xref myst">Legal Information</span></a></p></li>
<li><p><a class="reference internal" href="LEGAL_INFORMATION.html"><span class="std std-doc">Legal Information</span></a></p></li>
</ul>
</section>
</section>
Expand Down
2 changes: 1 addition & 1 deletion latest/GenAIComps/comps/cores/telemetry/README.html
Original file line number Diff line number Diff line change
Expand Up @@ -876,7 +876,7 @@ <h2>Tracing<a class="headerlink" href="#tracing" title="Link to this heading">¶
<h2>Visualization<a class="headerlink" href="#visualization" title="Link to this heading"></a></h2>
<section id="visualize-metrics">
<h3>Visualize metrics<a class="headerlink" href="#visualize-metrics" title="Link to this heading"></a></h3>
<p>Please refer to <a class="reference internal" href="../../../../GenAIEval/evals/benchmark/grafana/README.html"><span class="std std-doc">OPEA grafana</span></a> to get the details of Prometheus and Grafana server setup. The Grafana dashboard JSON files are also provided under <a class="reference internal" href="../../../../GenAIEval/evals/benchmark/grafana/README.html"><span class="std std-doc">OPEA grafana</span></a> to visualize the metrics.</p>
<p>Please refer to <a class="reference internal" href="../../../../GenAIEval/evals/benchmark/grafana/README.html"><span class="std std-doc">OPEA grafana</span></a> to get the details of Prometheus and Grafana server setup. The Grafana dashboard JSON files are also provided under <a class="reference external" href="https://github.com/opea-project/GenAIEval/tree/main/evals/benchmark/grafana">OPEA grafana</a> to visualize the metrics.</p>
</section>
<section id="visualize-tracing">
<h3>Visualize tracing<a class="headerlink" href="#visualize-tracing" title="Link to this heading"></a></h3>
Expand Down
2 changes: 1 addition & 1 deletion latest/GenAIComps/comps/finetuning/README.html
Original file line number Diff line number Diff line change
Expand Up @@ -968,7 +968,7 @@ <h3>3.4 Leverage fine-tuned model<a class="headerlink" href="#leverage-fine-tune
</section>
<section id="descriptions-for-finetuning-parameters">
<h2>🚀4. Descriptions for Finetuning parameters<a class="headerlink" href="#descriptions-for-finetuning-parameters" title="Link to this heading"></a></h2>
<p>We utilize <a class="reference external" href="https://platform.openai.com/docs/api-reference/fine-tuning">OpenAI finetuning parameters</a> and extend it with more customizable parameters, see the definitions at <a class="reference internal" href="#/GenAIComps/comps/finetuning/finetune_config.py/README.md"><span class="xref myst">finetune_config</span></a>.</p>
<p>We utilize <a class="reference external" href="https://platform.openai.com/docs/api-reference/fine-tuning">OpenAI finetuning parameters</a> and extend it with more customizable parameters, see the definitions at <a class="reference external" href="https://github.com/opea-project/GenAIComps/blob/main/comps/finetuning/finetune_config.py">finetune_config</a>.</p>
</section>
</section>

Expand Down
2 changes: 1 addition & 1 deletion latest/GenAIEval/README.html
Original file line number Diff line number Diff line change
Expand Up @@ -940,7 +940,7 @@ <h2>Additional Content<a class="headerlink" href="#additional-content" title="Li
<li><p><a class="reference internal" href="../community/CODE_OF_CONDUCT.html"><span class="std std-doc">Code of Conduct</span></a></p></li>
<li><p><a class="reference internal" href="../community/CONTRIBUTING.html"><span class="std std-doc">Contribution</span></a></p></li>
<li><p><a class="reference internal" href="../community/SECURITY.html"><span class="std std-doc">Security Policy</span></a></p></li>
<li><p><a class="reference internal" href="#/LEGAL_INFORMATION.md"><span class="xref myst">Legal Information</span></a></p></li>
<li><p><a class="reference internal" href="LEGAL_INFORMATION.html"><span class="std std-doc">Legal Information</span></a></p></li>
</ul>
</section>
</section>
Expand Down
2 changes: 1 addition & 1 deletion latest/GenAIEval/doc/platform-optimization/README.html
Original file line number Diff line number Diff line change
Expand Up @@ -849,7 +849,7 @@ <h2>Configure<a class="headerlink" href="#configure" title="Link to this heading
<a class="reference internal" href="../../../GenAIExamples/ChatQnA/README.html"><span class="std std-doc">ChatQnA</span></a>
application’s Gaudi accelerated pipeline.</p>
<p>In the
<a class="reference internal" href="#/GenAIExamples/ChatQnA/kubernetes/intel/hpu/gaudi/manifest/chatqna.yaml/README.md"><span class="xref myst">manifest</span></a>
<a class="reference external" href="https://github.com/opea-project/GenAIExamples/blob/main/ChatQnA/kubernetes/intel/hpu/gaudi/manifest/chatqna.yaml">manifest</a>
there are “tgi”, “tei” and “teirerank” containers in “chatqna-tgi” and
“chatqna-tei” and “chatqna-teirerank” deployments that will need a lot
of CPUs. They implement text-generation-interface and
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -829,9 +829,11 @@ <h2>CRAG dataset<a class="headerlink" href="#crag-dataset" title="Link to this h
</section>
<section id="launch-agent-qna-system">
<h2>Launch agent QnA system<a class="headerlink" href="#launch-agent-qna-system" title="Link to this heading"></a></h2>
<p>Here we showcase a RAG agent in GenAIExample repo. Please refer to the README in the <a class="reference internal" href="../../../../../GenAIExamples/AgentQnA/README.html"><span class="std std-doc">AgentQnA example</span></a> for more details. </br>
<strong>Please note</strong>: This is an example. You can build your own agent systems using OPEA components, then expose your own systems as an endpoint for this benchmark.</br>
To launch the agent in our AgentQnA example, open another terminal and build images and launch agent system there.</p>
<p>Here we showcase a RAG agent in GenAIExample repo. Please refer to the README in the <a class="reference internal" href="../../../../../GenAIExamples/AgentQnA/README.html"><span class="std std-doc">AgentQnA example</span></a> for more details.</p>
<blockquote>
<div><p><strong>Please note</strong>: This is an example. You can build your own agent systems using OPEA components, then expose your own systems as an endpoint for this benchmark.</p>
</div></blockquote>
<p>To launch the agent in our AgentQnA example, open another terminal and build images and launch agent system there.</p>
<ol class="arabic simple">
<li><p>Build images</p></li>
</ol>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -759,18 +759,18 @@

<section id="autorag-to-evaluate-the-rag-system-performance">
<h1>AutoRAG to evaluate the RAG system performance<a class="headerlink" href="#autorag-to-evaluate-the-rag-system-performance" title="Link to this heading"></a></h1>
<p>AutoRAG is help to end-to-end evaluate the performance of the whole system. Currently, we support to evaluate the performance from 4 perspectives, answer_relevancy, faithfulness, context_recall, context_precision. Before using this service, the use should firstly prepare the groundtruth dataset in the <a class="reference internal" href="#/GenAIEval/evals/benchmark/ragas/ground_truth.jsonl/README.md"><span class="xref myst">standard format</span></a>. We also provide a <a class="reference internal" href="#/GenAIEval/evals/evaluation/autorag/data_generation/gen_eval_dataset.py/README.md"><span class="xref myst">script</span></a> to automatically generate the groundtruth query and answer.</p>
<p>AutoRAG is help to end-to-end evaluate the performance of the whole system. Currently, we support to evaluate the performance from 4 perspectives, answer_relevancy, faithfulness, context_recall, context_precision. Before using this service, the use should firstly prepare the groundtruth dataset in the <a class="reference external" href="https://github.com/opea-project/GenAIEval/blob/main/evals/benchmark/ragas/ground_truth.jsonl">standard format</a>. We also provide a <a class="reference external" href="https://github.com/opea-project/GenAIEval/blob/main/evals/evaluation/autorag/data_generation/gen_eval_dataset.py">script</a> to automatically generate the groundtruth query and answer.</p>
<section id="service-preparation">
<h2>Service preparation<a class="headerlink" href="#service-preparation" title="Link to this heading"></a></h2>
<p>The evaluation for the RAG system is based on the set up of the RAG services. Please follow <a class="reference internal" href="../../../../../GenAIExamples/ChatQnA/README.html"><span class="std std-doc">the steps</span></a> to set up your RAG services.</p>
</section>
<section id="rag-evaluation">
<h2>RAG evaluation<a class="headerlink" href="#rag-evaluation" title="Link to this heading"></a></h2>
<p>At this moment, we provide a solution that test the single group of parameters and multiple groups of parameters. For evaluating the single group of parameters, please firectly use <a class="reference internal" href="#/GenAIEval/evals/evaluation/autorag/evaluation/ragas_evaluation_benchmark.py/README.md"><span class="xref myst">this script</span></a>.</p>
<p>At this moment, we provide a solution that test the single group of parameters and multiple groups of parameters. For evaluating the single group of parameters, please firectly use <a class="reference external" href="https://github.com/opea-project/GenAIEval/blob/main/evals/evaluation/autorag/evaluation/ragas_evaluation_benchmark.py">this script</a>.</p>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>python<span class="w"> </span>-u<span class="w"> </span>ragas_evaluation_benchmark.py<span class="w"> </span>--ground_truth_file<span class="w"> </span>ground_truth.jsonl<span class="w"> </span>--search_type<span class="w"> </span>mmr<span class="w"> </span>--k<span class="w"> </span><span class="m">1</span><span class="w"> </span>--fetch_k<span class="w"> </span><span class="m">5</span><span class="w"> </span>--score_threshold<span class="w"> </span><span class="m">0</span>.3<span class="w"> </span>--top_n<span class="w"> </span><span class="m">1</span><span class="w"> </span>--temperature<span class="w"> </span><span class="m">0</span>.01<span class="w"> </span>--top_k<span class="w"> </span><span class="m">5</span><span class="w"> </span>--top_p<span class="w"> </span><span class="m">0</span>.95<span class="w"> </span>--repetition_penalty<span class="w"> </span><span class="m">1</span>.1<span class="w"> </span>--use_openai_key<span class="w"> </span>True
</pre></div>
</div>
<p>For evaluating multiple groups of parameters, please use <a class="reference internal" href="#/GenAIEval/evals/benchmark/ragas/run_rag_benchmark.py/README.md"><span class="xref myst">this script</span></a>.</p>
<p>For evaluating multiple groups of parameters, please use <a class="reference external" href="https://github.com/opea-project/GenAIEval/blob/main/evals/benchmark/ragas/run_rag_benchmark.py">this script</a>.</p>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>python<span class="w"> </span>-u<span class="w"> </span>run_rag_benchmark.py<span class="w"> </span>--config<span class="w"> </span>config.yaml
</pre></div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -772,7 +772,7 @@ <h2>Metrics<a class="headerlink" href="#metrics" title="Link to this heading">¶
<h2>Evaluation<a class="headerlink" href="#evaluation" title="Link to this heading"></a></h2>
<section id="launch-asr-microservice">
<h3>Launch ASR microservice<a class="headerlink" href="#launch-asr-microservice" title="Link to this heading"></a></h3>
<p>Launch the ASR microserice with the following commands. For more details please refer to <a class="reference internal" href="#/GenAIComps/comps/asr/README.md"><span class="xref myst">doc</span></a>.</p>
<p>Launch the ASR microserice with the following commands. For more details please refer to <a class="reference internal" href="../../../../GenAIComps/comps/asr/whisper/README.html"><span class="std std-doc">doc</span></a>.</p>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>git<span class="w"> </span>clone<span class="w"> </span>https://github.com/opea-project/GenAIComps
<span class="nb">cd</span><span class="w"> </span>GenAIComps
docker<span class="w"> </span>build<span class="w"> </span>-t<span class="w"> </span>opea/whisper:latest<span class="w"> </span>--build-arg<span class="w"> </span><span class="nv">https_proxy</span><span class="o">=</span><span class="nv">$https_proxy</span><span class="w"> </span>--build-arg<span class="w"> </span><span class="nv">http_proxy</span><span class="o">=</span><span class="nv">$http_proxy</span><span class="w"> </span>-f<span class="w"> </span>comps/asr/whisper/Dockerfile<span class="w"> </span>.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -820,7 +820,7 @@ <h3>Kubernetes Cluster Example<a class="headerlink" href="#kubernetes-cluster-ex
</section>
<section id="manifest-preparation">
<h3>Manifest preparation<a class="headerlink" href="#manifest-preparation" title="Link to this heading"></a></h3>
<p>We have created the <a class="reference internal" href="#/GenAIExamples/ChatQnA/benchmark/README.md"><span class="xref myst">BKC manifest</span></a> for single node, two nodes and four nodes K8s cluster. In order to apply, we need to check out and configure some values.</p>
<p>We have created the <a class="reference external" href="https://github.com/opea-project/GenAIExamples/tree/main/ChatQnA/benchmark">BKC manifest</a> for single node, two nodes and four nodes K8s cluster. In order to apply, we need to check out and configure some values.</p>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span><span class="c1"># on k8s-master node</span>
git<span class="w"> </span>clone<span class="w"> </span>https://github.com/opea-project/GenAIExamples.git
<span class="nb">cd</span><span class="w"> </span>GenAIExamples/ChatQnA/benchmark/performance
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1172,7 +1172,7 @@ <h3>Validate Microservices<a class="headerlink" href="#validate-microservices" t
<li><p>Dataprep Microservice(Optional)</p></li>
</ol>
<p>If you want to update the default knowledge base, you can use the following commands:</p>
<p>Update Knowledge Base via Local File <a class="reference internal" href="#/GenAIComps/comps/retrievers/redis/data/nke-10k-2023.pdf/README.md"><span class="xref myst">nke-10k-2023.pdf</span></a>. Or
<p>Update Knowledge Base via Local File <a class="reference external" href="https://github.com/opea-project/GenAIComps/blob/main/comps/retrievers/redis/data/nke-10k-2023.pdf">nke-10k-2023.pdf</a>. Or
click <a class="reference external" href="https://raw.githubusercontent.com/opea-project/GenAIComps/main/comps/retrievers/redis/data/nke-10k-2023.pdf">here</a> to download the file via any web browser.
Or run this command to get the file on a terminal.</p>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>wget<span class="w"> </span>https://raw.githubusercontent.com/opea-project/GenAIComps/main/comps/retrievers/redis/data/nke-10k-2023.pdf
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -760,7 +760,7 @@
<section id="deploy-chatqna-in-kubernetes-cluster-on-xeon-and-gaudi">
<h1>Deploy ChatQnA in Kubernetes Cluster on Xeon and Gaudi<a class="headerlink" href="#deploy-chatqna-in-kubernetes-cluster-on-xeon-and-gaudi" title="Link to this heading"></a></h1>
<p>This document outlines the deployment process for a ChatQnA application utilizing the <a class="reference external" href="https://github.com/opea-project/GenAIComps.git">GenAIComps</a> microservice pipeline components on Intel Xeon server and Gaudi machines.</p>
<p>The ChatQnA Service leverages a Kubernetes operator called genai-microservices-connector(GMC). GMC supports connecting microservices to create pipelines based on the specification in the pipeline yaml file in addition to allowing the user to dynamically control which model is used in a service such as an LLM or embedder. The underlying pipeline language also supports using external services that may be running in public or private cloud elsewhere.</p>
<p>The ChatQnA Service leverages a Kubernetes operator called genai-microservices-connector (GMC). GMC supports connecting microservices to create pipelines based on the specification in the pipeline yaml file in addition to allowing the user to dynamically control which model is used in a service such as an LLM or embedder. The underlying pipeline language also supports using external services that may be running in public or private cloud elsewhere.</p>
<p>Install GMC in your Kubernetes cluster, if you have not already done so, by following the steps in Section “Getting Started” at <a class="reference internal" href="../../../../GenAIInfra/microservices-connector/README.html"><span class="std std-doc">GMC Install</span></a>. Soon as we publish images to Docker Hub, at which point no builds will be required, simplifying install.</p>
<p>The ChatQnA application is defined as a Custom Resource (CR) file that the above GMC operator acts upon. It first checks if the microservices listed in the CR yaml file are running, if not starts them and then proceeds to connect them. When the ChatQnA RAG pipeline is ready, the service endpoint details are returned, letting you use the application. Should you use “kubectl get pods” commands you will see all the component microservices, in particular <code class="docutils literal notranslate"><span class="pre">embedding</span></code>, <code class="docutils literal notranslate"><span class="pre">retriever</span></code>, <code class="docutils literal notranslate"><span class="pre">rerank</span></code>, and <code class="docutils literal notranslate"><span class="pre">llm</span></code>.</p>
<section id="using-prebuilt-images">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -760,7 +760,7 @@
<section id="deploy-codegen-in-a-kubernetes-cluster">
<h1>Deploy CodeGen in a Kubernetes Cluster<a class="headerlink" href="#deploy-codegen-in-a-kubernetes-cluster" title="Link to this heading"></a></h1>
<p>This document outlines the deployment process for a Code Generation (CodeGen) application that utilizes the <a class="reference external" href="https://github.com/opea-project/GenAIComps.git">GenAIComps</a> microservice components on Intel Xeon servers and Gaudi machines.</p>
<p>Install GMC in your Kubernetes cluster, if you have not already done so, by following the steps in Section “Getting Started” at <a class="reference internal" href="../../../../GenAIInfra/microservices-connector/README.html#readme"><span class="std std-ref">GMC Install</span></a>. We will soon publish images to Docker Hub, at which point no builds will be required, further simplifying install.</p>
<p>Install GMC in your Kubernetes cluster, if you have not already done so, by following the steps in Section “Getting Started” at <a class="reference internal" href="../../../../GenAIInfra/microservices-connector/README.html"><span class="std std-doc">GMC Install</span></a>. We will soon publish images to Docker Hub, at which point no builds will be required, further simplifying install.</p>
<p>If you have only Intel Xeon machines you could use the codegen_xeon.yaml file or if you have a Gaudi cluster you could use codegen_gaudi.yaml
In the below example we illustrate on Xeon.</p>
<section id="deploy-the-rag-application">
Expand Down
Loading

0 comments on commit 13b7af0

Please sign in to comment.