achieve.ai Powered by MindsDB: Transforming Your Goals Into Reality

achieve.ai Powered by MindsDB: Transforming Your Goals Into Reality

ยท

4 min read

Introduction :

Hello tech enthusiasts! ๐Ÿ‘‹ Today, I'm excited to introduce not just a project but an AI that has the potential to significantly impact your life. The idea struck me, and I realized I would personally benefit from this AI โ€“ a rare occurrence.

Many of us harbor great ideas, goals, and aspirations. Perhaps you had the concept of something like Facebook before it even existed but couldn't bring it to fruition. We often find ourselves procrastinating, and I was no exception. The project idea had been on my wishlist for months, and it was the collaboration between Hashnode and MindsDB in a hackathon that provided the catalyst I needed.

What achieve .ai Actually Is ?

Let's cut to the chase and delve into achieve .ai. It's a web application where you input your short or long-term goals. The application utilizes the state-of-the-art Gemini-Pro model and well-curated prompts in the background to generate daily, bite-sized achievable tasks. These tasks are designed to guide you toward realizing your goals.

You might be wondering, "Why not prompt the language model myself? Why use your web app?" Well, our web app offers more than that. It provides a user-friendly interface, eliminating the need for prompt engineering and the hassle of interacting with a language model.

Using our web app is as straightforward as using a calculator. Input your one-line goal, provide a description, specify the deadline, and within seconds, you'll have a personalized journey to achieving that goal. It seamlessly integrates with your Google Calendar, presenting tasks in a convenient format if you prefer.

Now, let's explore the intriguing part โ€“ how we built this.

Setting Things Up

Now, let's talk about getting the environment ready. I simply used the "pip install" command to get MindsDB from the source. As for the front end, we utilized Next.js and React for MindsDB.

Implementing Mindsdb Integration

I've noticed that many tutorials use OpenAI, but the issue I encountered, and probably others have too, is that I had already used up all my OpenAI credits and didn't have much money to play around with the API. However, I stumbled upon Google's Gemini handler and had $300 in Google Cloud credits, which was great!

Firstly, I went through the readme here to understand it better.

there was a little typo which i fixed here .

for setting up the model on MindsDB. first, I connected to Supabase to use as the data source for the project.

CREATE DATABASE [IF NOT EXISTS] datasource_name
[WITH] [ENGINE [=] engine_name] [,]
[PARAMETERS [=] {
  "key": "value",
  ...
}];

Then we had creating an engine named gemini_ml_engine using the api key which can be obtained here

CREATE ML_ENGINE gemini_ml_engine
FROM google_gemini
USING
  api_key = 'cloud_api_key';

moving on , we can create a model using the following query which predicts the answer.

CREATE MODEL mindsdb.google_gemini_test
PREDICT answer
USING
  column = 'question',
  engine = 'Gemini_ML_Engine',
  api_key = 'cloud_api_key',
  model = 'gemini-pro'

prompt can be given in the question .

one more thing which we encountered here was that the questionvariable coudn't be named anything else , for example if we change the name of the column from "question" to "goals" it was send us error, it wasn't specified in the readme to only use the name "question" either. I assume it was due to a pre-declared dict of acceptable variables.

SELECT question, answer
FROM mindsdb.google_gemini_test
WHERE question = 'What is the meaning of life?';

now , this implemented a basic question and answering output , but the challenge was that, I needed to put in my unique prompt and I also needed to integrate it with supabase so that it takes goals from the supabase table. I implemented the the code, syntax of the same can be found below.

INSERT INTO supabase_datasource.tasks (goal_id, task_description)
SELECT CONCAT('<prompt> basis.') as question, output.answer
FROM supabase_datasource.goals as input
JOIN mindsdb.google_gemini_test2 as output ON input.question = output.question;

Github Repo - achieve.ai

Team

I teamed up with Victor Ngo to create this project. Victor took charge of the front-end, crafting it beautifully and handling most of the tasks. Meanwhile, my focus was on seamlessly integrating MindsDB and writing the article.

Did you find this article valuable?

Support Mohammed Ismail by becoming a sponsor. Any amount is appreciated!

ย