NVIDIA
NVIDIA
retail-shopping-advisor-codebase
Resource
NVIDIA
NVIDIA
retail-shopping-advisor-codebase

The codebase for Retail shopping advisor AI workflow

Subscribe to get accessSubscribe to the product below to access this premium content:
NVIDIA AI Enterprise
NVIDIA AI EnterpriseAccelerate your AI agent development
Subscribe Now
Note: You can gain access to hundreds more GPU-optimized artifacts by creating a free NGC account.
Already Subscribed?Log in

Getting Started with the Source Code (NGC CLI)

To install the NGC CLI please refer to the NGC CLI Installation Instructions

$ ngc registry resource download-version "nvidia/aiworkflows/retail-shopping-advisor-codebase:0.2"

Getting files to download...

-----------------------------------------------------------------------------------

   Duration taken: 5s
-----------------------------------------------------------------------------------

Ensure you are in the right folder and set some environment variables


cd retail-shopping-advisor-codebase_v0.2
export NGC_CLI_API_KEY="<Set the NGC API KEY>”
export NVIDIA_API_KEY=”<Set the NVIDIA API KEY">
export NOTEBOOKS_DIR=$(pwd)/notebooks
export DATA_DIR=$(pwd)/data

Review the config file in the chatbot-service folder

You will need to change the “mode” or the “embedding_mode” setting. To begin with, change the “embedding_mode” value to “endpoint”. With this configuration, the docker compose file used in the next step is docker-compose.yaml.

When you change the “mode” value to “nim”, the docker compose used in the next step is docker-compose-nims.yaml.

cat chatbot-service/fastapi/config.yaml 
openai: False
mode: "endpoint"
nim_model_name: "meta/llama3-8b-instruct"
nim_base_url: "http://llm:8000/v1"
milvus_url: "http://milvus:19530"
endpoint_model_name: "meta/llama3-70b-instruct"
csv_name: "gear-store.csv"
top_k: 2
temperature: 0
top_p: 0.5
max_tokens: 1024
sim_coeff: 0.3
embedding_mode: "nim"
nim_embedding_model_name: "nv-embedqa-e5-v5"
nim_embedding_base_url: "http://embedding:8000/v1"
embedding_model_name: "NV-Embed-QA"

Docker login and deploy the docker containers


docker login nvcr.io
Username: $oauthtoken
Password:

docker-compose -f <docker compose file from the previous step> up -d

The docker compose results in the creation of the services for frontend service, the jupyter lab service and the backend API

In case the docker compose file used was ““docker-compose-nims.yaml”, then 2 additional services will be deployed. These correspond to the 2 NIMs deployed.

  • Llama3-8b-instruct
  • Nv-embedqa-e5-v5

You can now edit the code and redeploy the containers to suit your specific requirements.



Additional Resources

Request a free 90-day evaluation license for NVIDIA AI Enterprise and try the retail shopping advisor AI workflow.

Learn more about how to use NVIDIA NIM microservices for RAG through our Deep Learning Institute. Access the course here.

Contact NVIDIA to learn more about how you can purchase NVIDIA AI Enterprise for your production deployment.



Licenses

By downloading or using NVIDIA NIM inference microservices included in the retail shopping advisor workflow you agree to the terms of the NVIDIA Software License Agreement and Product-specific Terms for AI products.

By downloading or using the product catalog in the retail shopping advisor workflow you agree to the terms of the NVIDIA Asset License.



Get Help

Publisher
NVIDIA
NVIDIA
Latest Version0.2
UpdatedJuly 26, 2024 UTC
Compressed Size51.8 MB