You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+69-8Lines changed: 69 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -19,15 +19,15 @@ The application is designed for home cooks, culinary enthusiasts, individuals wi
19
19
20
20
### Integration of Generative AI
21
21
22
-
Generative AI is integrated meaningfully through a dedicated LLM microservice developed in Python. This service processes user inputs in natural language, generates recipes based on the provided ingredients, modifies existing recipes according to user needs, and provides meal suggestions. The use of GenAI enhances the user experience by offering creative, context-aware, and highly adaptable culinary solutions.
22
+
Generative AI is integrated meaningfully through a dedicated LLM microservice developed in Python. This service processes user inputs in natural language, generates recipes based on the provided ingredients, modifies existing recipes according to user needs, and provides meal suggestions based on the user dietary preferences. The use of GenAI enhances the user experience by offering a personalized RAG system that emphasizes user-specific recipe collections. Through the use of a conversational AI system, we provide to the users with a multi-turn chat with context preservation.
23
23
24
24
### Functional Scenarios
25
25
26
26
1.**Ingredient-Based Recipe Generation**: A user inputs, "Suggest a quick dinner recipe with chicken and broccoli." The system uses the LLM to generate a relevant recipe, which is presented to the user through the user interface.
27
27
28
28
2.**Recipe Modification**: A user submits a traditional recipe and requests, "Make this vegan." The LLM identifies non-vegan ingredients and substitutes them with plant-based alternatives, returning a modified version of the recipe.
29
29
30
-
3.**Meal Planning**: A user asks for a weekly meal plan. The LLM generates a diverse and nutritionally balanced plan, optionally based on dietary restrictions or cuisine preferences.
30
+
3.**Meal Planning with User Preferences**: A user defines his/her dietary preferences in the web application and asks for a weekly meal plan in the chat. The LLM generates a diverse and nutritionally balanced plan, based on dietary restrictions or cuisine preferences.
31
31
32
32
4.**Ingredient-Limited Cooking**: A user specifies available ingredients, such as "eggs, spinach, and cheese," and the system suggests recipes that can be prepared using those ingredients, optimizing for simplicity and flavor.
33
33
@@ -52,6 +52,7 @@ Generative AI is integrated meaningfully through a dedicated LLM microservice de
@@ -77,9 +78,9 @@ Generative AI is integrated meaningfully through a dedicated LLM microservice de
77
78
**Responsibilities:**
78
79
79
80
- Process incoming prompts and preferences.
80
-
- Use LLM (e.g., GPT via LangChain) to generate, modify, and plan recipes.
81
+
- Use LLM (e.g., GPT via LangChain or Llama3) to generate, modify, and plan recipes.
82
+
- Fetch additional data from a well known recipe source stored in the vector database Qdrant to enable document retrieval for answering recipe document based questions.
81
83
- Structure outputs into JSON responses and provide endpoints via FastAPI for server module.
82
-
- Fetch additional data from a well known recipe source stored in the vector database Qdrant.
83
84
84
85
**Design:**
85
86
@@ -102,7 +103,7 @@ Generative AI is integrated meaningfully through a dedicated LLM microservice de
102
103
103
104
**Collections:**
104
105
105
-
-`recipes` – Stores embedded recipe documents which are uploaded by the user
106
+
-`recipes` – Stores user specific embedded recipe documents which are uploaded by the user
106
107
107
108
### 6. DevOps
108
109
@@ -130,7 +131,8 @@ Generative AI is integrated meaningfully through a dedicated LLM microservice de
130
131
### Communication Flow Example
131
132
132
133
1. User logs in via GitLab LRZ → token returned.
133
-
2. User types: _"Suggest a vegan dinner with lentils."_
134
+
2. User select his/her didtary preferences.
135
+
2. User types: _"Suggest a dinner with lentils."_
134
136
3. React sends prompt + preferences to Spring Boot API.
135
137
4. API calls GenAI microservice with combined data.
136
138
5. GenAI returns structured recipe.
@@ -180,6 +182,48 @@ cd team-continuous-disappointment
180
182
181
183
### Server Setup
182
184
185
+
**Note**: Please be aware that you need to manually add the GITLAB_CLIENT_SECRET from the `.env` file (see [.env.template](.env.template)) to the [application.yaml](server/api-gw/src/main/resources/application.yaml) file for the field `client-secret` for local development.
@@ -281,7 +325,7 @@ The LLM service will be available at [http://localhost:8000](http://localhost:80
281
325
282
326
- Built with FastAPI for AI-powered recipe recommendations.
283
327
- Integrates with local and cloud LLMs for generating suggestions based on the given ingredients.
284
-
- Stores embedded documents in a vector database to be able to make similarity search.
328
+
- Stores embedded documents in a vector database to be able to make similarity search and document retrieval.
285
329
- Source code is in the `genai` directory.
286
330
- Tests are in the `genai/tests` directory.
287
331
@@ -505,7 +549,24 @@ API documentation is available in the [`genai/openapi.yaml`](genai/openapi.yaml)
505
549
- Usability: The chat interface must be responsive and intuitive.
506
550
- Observability & Monitoring: The system must expose Prometheus metrics for all critical services. Dashboards must be created in Grafana to visualize response latency, error rates, and user request volume. Besides that, at least one alert must be defined.
507
551
508
-
## Architecture Overview - TODO
552
+
## Architecture Overview
553
+
554
+
### UML Component Diagram
555
+
556
+
The following UML component diagram shows the details of the RecipAI application architecture and provides a comprehensive overview of the interfaces offered by the genai, chat, user, and API gateway services.
0 commit comments