How debarun1234/nestle-hr-ai-assistant works
1. Repository shape
- This is a notebook-first prototype, not a packaged web service or multi-service application.
- The main executable artifact is ags_nestle_genai.ipynb, which likely contains the full assistant pipeline end to end.
2. Primary business input
- The assistant is grounded in a single source document: nestle_hr_policy.pdf.
- That PDF is the knowledge base the assistant is intended to answer from, so it is the main domain-data boundary in the system.
3. Core AI runtime
- The model layer uses Hugging Face Transformers with Meta LLaMA 3.1 8B.
- The README shows direct loading of the tokenizer/model and moving the model to CUDA GPU, so inference is designed for local GPU-backed execution rather than a hosted model API.
4. Assistant orchestration
- The notebook likely performs the orchestration steps needed to turn policy text into answers:
- load/read the policy document
- prepare context or prompts
- send user questions to the LLM
- return a grounded response
- The notebook is the place where document handling and inference are wired together.
5. User interaction layer
- The UI is built with Gradio, which provides a lightweight conversational interface.
- In architecture terms, Gradio is the presentation boundary: it receives the user’s HR question and displays the model’s answer.
6. Request/response flow
- The runtime flow is essentially:
- User question in Gradio
- passed into the notebook’s assistant logic
- policy document context is applied
- LLaMA 3.1 generates a response
- answer is shown back in Gradio
- No separate backend, queue, or database is indicated.
7. Document and knowledge boundaries
- The repo contains only a small set of artifacts, so knowledge appears to be static and file-based.
- There is no sign of an indexing service, vector store, or external HR system in the repository tree provided, so the main dependency is the PDF itself.
8. Execution environment
- The project is intended to run in a Python environment created from requirements.txt.
- The README explicitly calls out a virtual environment and huggingface-cli login, so the setup depends on authenticated Hugging Face access.
9. Infrastructure dependencies
- The architecture assumes access to:
- Hugging Face model weights
- a machine with sufficient GPU memory
- This means the system is compute-heavy and not positioned as a thin client.
10. Supporting artifacts
- Nestle_HR_Assistant_Code_debarun.docx appears to be documentation of the implementation, not a runtime component.
- The screenshot file is also non-runtime.
- These are useful for understanding or demonstrating the solution, but they do not affect the runtime architecture.
11. What is not present
- There is no evidence of:
- a persistent database
- a separate API server
- background workers
- authentication/authorization logic for end users
- deployment infrastructure
- So the architecture is best drawn as a single-machine notebook app with local model inference and a Gradio front end.
12. Best diagram framing
- The cleanest architecture diagram would show three main blocks:
- Policy document source (nestle_hr_policy.pdf)
- Notebook/assistant logic (ags_nestle_genai.ipynb)
- Gradio UI + Hugging Face LLaMA 3.1 inference
- With external dependencies for Hugging Face authentication/model download and GPU execution.
Main entry points: ags_nestle_genai.ipynb Assistant notebook · README.md README · nestle_hr_policy.pdf HR policy · requirements.txt Python env
Components 8
Assistant app
Notebook-driven assistant orchestration and UI.
- Assistant notebook · Main executable artifact that loads the policy, builds prompts, and coordinates inference.
ags_nestle_genai.ipynb - Gradio UI · Lightweight conversational front end for entering HR questions and showing answers.
- LLaMA 3.1 · Meta LLaMA 3.1 8B loaded through Hugging Face Transformers for local GPU inference.
Knowledge source
Static policy document used as the grounded input.
- HR policy · Primary knowledge base used to ground responses.
nestle_hr_policy.pdf
Support files
Documentation and packaging artifacts around the prototype.
- Hugging Face · External model and tokenizer source, authenticated via huggingface-cli login.
- CUDA GPU · Local accelerator required for model loading and generation.
- Python env · Requirements-defined Python environment used to run the notebook.
requirements.txt - README · Setup and execution instructions for the prototype.
README.md
Connections 9
- HR policy → Assistant notebook: provides context · The notebook reads the policy document as the grounding source.
- Assistant notebook → Gradio UI: serves answers · Notebook logic powers the conversational interface.
- Gradio UI → Assistant notebook: submits question · User prompts enter through the Gradio front end.
- Assistant notebook → LLaMA 3.1: calls inference · The assistant logic sends prompts to the local LLM runtime.
- LLaMA 3.1 → CUDA GPU: runs on · Model inference is executed on CUDA hardware.
- Hugging Face → LLaMA 3.1: downloads weights · Model and tokenizer are obtained from Hugging Face.
- Python env → Assistant notebook: sets runtime · Python dependencies define the execution environment.
- README → Assistant notebook: documents setup · README explains how to launch the notebook-based assistant.
- README → Hugging Face: notes login · Setup depends on authenticated Hugging Face access.