Inspiration

This project is made to showcase the use of LLMs in something more than chatbots, being powerful tool to generate content tailored to your needs, I wanted to explore if LLMs could revolutionize the user experience on websites, making websites that is made with the preferences of the user

What it does

The project it's a home page of a fictional SaaS businees, that provides an online coworking space, but on te first load, the user will input it's details, like if they are a team, or what industry do the belong to. Depending on what the user inputs, an LLM (in this case llama3:8b running locally) will generate the most relevant text using this preferences to increase user engagement.

How we built it

The project is divided in frontend(React.js) and backend(Node.js & Express.js).

When the user makes a request, the website makes a request to the StoryBlok API which will send back the necessary json. This json doesn't have any meaningflu content, but it's the structure of the whole website.

When the frontend recieves the StoryBlok json, it is send to the backend alongside the user preferences, and the backend first calls the LLM to generate the content, then parses this content to be inserted back into the StoryBlok json that we had in the first palce, but we the nwely created content.

Also I have implemented a file caching system to increase efficiency and to not have users waiting forever if the reload the page.

Challenges we ran into

The biggest challenge was to make the LLM generate content that could be inserted back into the StoryBlok json. For this I ended up with two separate functions, one for parsing the LLM content, since it always had unnecessary lines or words, and another function to insert it back into the json.

If the StoryBlok json schema is changed through the visual editor, the functions would need to be changed to match the new schema.

Accomplishments that we're proud of

Creating a system that personalizes everything for the end-user hasn't been implemented yet on most websites, but I think that this method will be the future for websites based on heavy user-interaction. By making this project I try to showcase one of the things that can be done and putting the first stone in the path that will be built using LLMs as support.

What we learned

Learning StoryBlok and CMS has been a game changer for me. The structure that StoryBlok gives and the comfort that gives the Visual Editor makes it my go to when developing frontend applications now.
Aside from this, I have learned a lot about LLMs and it's use aside from the usual chatbots, optimizing it and it's prompts to generate exactly what I wanted.

What's next for AI-personalized-website

The next step would be to implement this method into a formal new or already made website, diving also into cloud implementation, moving from a locally hosted LLM to a cloud hosted one.

Built With

Share this project:

Updates