-
Notifications
You must be signed in to change notification settings - Fork 3
feat: What's Cooking With AI #33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
MoermansJ
wants to merge
38
commits into
source
Choose a base branch
from
feature/2024-03-25-whatscooking
base: source
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from 4 commits
Commits
Show all changes
38 commits
Select commit
Hold shift + click to select a range
72114fc
feat(whatscooking): added post introduction - authors - bannerImg
AyoubAitcheikhahmed 15e9669
feat(whatscooking): Leveraging AI & Conclusion drafts
MoermansJ 114fb28
feat(whatscooking): Updated Table Of Contents
MoermansJ 9c937a8
feat(whatscooking): Leveraging AI & Conclusion drafts update
MoermansJ ae0e7f8
feat(whatscooking): Added Our Project & Application Architecture
MoermansJ d83b6ec
feat(whatscooking): added technologies and our experience section
AyoubAitcheikhahmed b5863e5
Merge branch 'feature/2024-03-25-whatscooking' of https://github.com/…
AyoubAitcheikhahmed 2b06123
feat(whatscooking): added benmchmarking tekst
AyoubAitcheikhahmed f4306f9
feat: readded our project, architecture & added more benchmarking
FebeCap 5601f12
refactor: rewrote intro& our project, fixed table of contents
FebeCap 5c1035e
refactor: changed writing style
FebeCap 01ef4df
feat: aws titan benchmarking, leveraging ai, conclusion
MoermansJ e0b1c99
feat: openAi benchmarking
AyoubAitcheikhahmed b069fd9
refactor: added requested changes
FebeCap b731b39
refactor: changed layout sentences
FebeCap 9646341
refactor: added request changes
MoermansJ 9d2ae68
feat: updated benchmarking - updated architecture image
AyoubAitcheikhahmed a314f9b
refactor: added author image
FebeCap 425d922
feat: jonathan moermans author image
MoermansJ 18fcd53
Merge branch 'feature/2024-03-25-whatscooking' of https://github.com/…
MoermansJ b3eccbc
refactor: updated jonathan moermans authors.yml entry
MoermansJ 51b2a3a
refactor: leveraging ai, benchmarking, amazon's titan, conclusion, us…
MoermansJ 15f1c72
refactor: changed table of contents
FebeCap 6c34bf4
refactor: Benchmarking AWS Titan active style of writing
MoermansJ a66e204
refactor: Leveraging AI
MoermansJ f80da20
refactor: Conclusion
MoermansJ 5c87490
Merge branch 'source' into feature/2024-03-25-whatscooking
FebeCap 5bf04e2
feat: blog split into 2 blogs
FebeCap 5914199
refactor: introduction, leveraging ai, conclusion
MoermansJ 41a15b3
refactor: added intro & conclusion
FebeCap 8118a67
refactor: our project
MoermansJ 840bf09
Merge branch 'feature/2024-03-25-whatscooking' of https://github.com/…
MoermansJ 85edfec
refactor: fixed text
FebeCap c9a1d35
refactor: fixed typos
FebeCap 1d25a8f
refactor: our project
MoermansJ e66d136
Merge branch 'feature/2024-03-25-whatscooking' of https://github.com/…
MoermansJ 71aa145
refactor: leveraging ai
MoermansJ ac2f815
refactor: whats cooking
MoermansJ File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -1223,4 +1223,34 @@ viktor_van_steenweghen: | |
| linkedin: viktorvansteenweghen | ||
| github: Vikteur | ||
| email: [email protected] | ||
| bio: Viktor is a Java Consultant with an interest in both back-end and front-end. | ||
| bio: Viktor is a Java Consultant with an interest in both back-end and front-end. | ||
| ayoub_ait_cheikh_ahmed: | ||
| first_name: Ayoub | ||
| last_name: Ait Cheikh Ahmed | ||
| permalink: /author/ayoub-ait-cheikh-ahmed/ | ||
| avatar: ayoub-ait-cheikh-ahmed.jpg | ||
| title: Junior Java Developer | ||
| linkedin: ayoub-ait-cheikh-ahmed | ||
| github: AyoubAitcheikhahmed | ||
| email: [email protected] | ||
| bio: Ayoub is a Java Developer with interest in AI, backend, frontend, IOT. | ||
| jonathan_moermans: | ||
| first_name: Jonathan | ||
| last_name: Moermans | ||
| permalink: /author/jonathan-moermans/ | ||
| avatar: jonathan-moermans.jpg | ||
| title: Junior Java Developer | ||
| linkedin: in/jonathan-moermans | ||
| github: MoermansJ | ||
| email: [email protected] | ||
| bio: Jonathan is an enthusiastic software developer with a passion for AI and Java. | ||
| febe_cap: | ||
| first_name: Febe | ||
| last_name: Cap | ||
| permalink: /author/febe-cap/ | ||
| avatar: febe-cap.jpg | ||
MoermansJ marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| title: Junior Java Developer | ||
| linkedin: in/febe-cap | ||
| github: FebeCap | ||
| email: [email protected] | ||
| bio: Febe is a motivated Java Developer interested in Java and AI. | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,69 @@ | ||
| --- | ||
| layout: post | ||
| authors: [ayoub-ait-cheikhahmed, jonathan, febe] | ||
MoermansJ marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| title: "Whats Cooking AI" | ||
| image: /img/2024-03-25-whatscooking/whatscooking-banner.jpg | ||
| tags: [AI, aws, internship, springAI, terraform, docker] | ||
| category: AI | ||
| comments: true | ||
| --- | ||
|
|
||
| # Table of contents | ||
FebeCap marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| - [Table of contents](#table-of-contents) | ||
FebeCap marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| - [Introduction](#introduction) | ||
| - [Application Architecture](#application-architecture) | ||
| - [Leveraging AI (DRAFT - Jonathan)](#leveraging-ai-draft---jonathan) | ||
| - [AI Benchmarking](#ai-benchmarking) | ||
| - [Conclusion (DRAFT - Jonathan)](#conclusion-draft---jonathan) | ||
|
|
||
| # Introduction | ||
|
|
||
| To align with the new trend of generative AI models we created What'sCooking which is an application where users can easily extract their shopping basket items with a click. These items undergo analysis by advanced AI, which then suggests personalized recipes based on the user's inventory. The AI filters the ingredients to ensure the suggestions align with the user's preferences. | ||
MoermansJ marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| The purpose is to test the usage of AI that generates new human-readable content rather than finding or classifying existing content. This falls under the category of LLMs. More explanations about this will be provided in upcoming sections. Furthermore, the purpose of Prompt Engineering and how it can make a big difference when tweaking communication with a large chat model will be discussed. | ||
|
|
||
| The application doesn't stop at recommendations; it dynamically generates images of suggested recipes. Users can also personalize their experience on the Preferences page, specifying dietary restrictions and culinary preferences. Powered by LLM, generative AI, and AWS for deployment, the app is at the forefront of innovation. Continuous updates ensure optimization of pricing, performance benchmarking, and accommodation of diverse user requests. | ||
MoermansJ marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| # Application Architecture | ||
|
|
||
MoermansJ marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| # Leveraging AI (DRAFT - Jonathan) | ||
|
|
||
| In our application, the backend receives data delivered by the Chrome plugin via HTTP request. | ||
| It performs various operations on this data, most of them involving AI. | ||
| We can categorise these AI-operations in to: | ||
|
|
||
| - Data cleaning | ||
| - Content generation | ||
|
|
||
| The first AI-operation is cleaning the data of undesired elements. | ||
| In our case this means filtering out the inedible ingredients from a collection of potentially edible ingredients. Without AI, handling this problem would require accessing a large dataset and executing multiple queries. Whereas in our application this entire process was replaced by a single prompt and handling of the response. | ||
| It even appears the AI has perfect judgement on whether something is safe for human consumption, and it is more stubborn than you would expect when you try to convince it otherwise. | ||
|
|
||
| With this potentially altered list of ingredients we can proceed to our second AI-operation, which is generating content in the shape of a recipe. | ||
| The AI model should take into account all the recipe requirements, and format its replies in a consistent & specific way. | ||
| Otherwise we run the risk of the AI-model's responses not being able to be reliably parsed into objects in a Java environment. | ||
|
|
||
| There are two main approaches to ensure consistency: | ||
|
|
||
| - Custom AI Model: Develop a tailored AI model, requiring more initial investment but offering precise alignment with your needs. | ||
|
|
||
| - Standard AI Model with Elaborate Prompts: Utilize a pre-existing AI model, supplementing it with detailed prompts to optimise its performance out-of-the-box. | ||
|
|
||
| While the prompts are stateless, meaning each prompt is self-contained and does not rely on previous interactions, we must provide all necessary instructions and data for each prompt. Despite the greater token efficiency of the first approach on a prompt-to-prompt basis, we opted for the second approach. This allows us to conveniently compare the performance of AI models by supplying them with the same prompt, facilitating our benchmarking and study. | ||
|
|
||
| To ensure proper formatting of the AI-model's replies we used a prompting technique called "Few-Shot Prompting". | ||
| Simply put, with Few-Shot Prompting you provide the AI model an example question & answer out of which it can establish a pattern. | ||
| For this approach we engineered a template to serve as a basis for our prompt, in which we inject the user supplied data before sending it to the AI. | ||
|
|
||
| # AI Benchmarking | ||
|
|
||
| # Conclusion (DRAFT - Jonathan) | ||
|
|
||
| The things we've learned: | ||
|
|
||
| - Introducing AI into our codebase has enabled us to streamline or fully replace traditional solutions, eliminating the need for additional assets like large datasets. With proper configuration, AI proves to be a potent tool for various operations on (user-supplied) data. | ||
|
|
||
| - Throughout project development, we encountered variations in the ability of AI models to comprehend large and extensive prompts. Some models excel in certain tasks while lacking in others, emphasizing the importance of evaluating and selecting models based on application requirements. | ||
|
|
||
| - Consistency is key when parsing string responses from AI into Java objects. | ||
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.