Presenting Minds! - Your Path to Acing Technical Interviews!

Presenting Minds! - Your Path to Acing Technical Interviews!

Are you ready to embark on a transformative journey with Minds? πŸš€ Let's dive into how this innovative Mock Coding Interview slack bot is poised to revolutionize technical interview preparation for software development and recruitment agencies alike, combining the power of OpenAI and mindsdb.

It's powered by the OpenAI's GPT models that MindsDB supports. This slack bot tool can easily act like your non-human interviewer who's smart enough to clean your codes, refactor them, and give solutions based on different cases.

All About Mindsdb

MindsDB is an open-source, explainable AutoML (Automated Machine Learning) framework designed to simplify the process of creating and deploying machine learning models. It focuses on predictive modeling and aims to make machine learning accessible to non-experts by automating various tasks involved in the machine learning workflow.

Key features of MindsDB include:

Explainability: MindsDB emphasizes model interpretability, making it easier for users to understand and trust the predictions made by machine learning models.

AutoML Capabilities: MindsDB automates the machine learning pipeline, from data preparation and feature engineering to model training and deployment. This reduces the need for users to have an in-depth understanding of machine learning algorithms.

Integration with SQL: MindsDB allows users to integrate machine learning directly into their databases using SQL queries. This simplifies the process of incorporating machine learning into existing data workflows.

Open Source: MindsDB is an open-source project, meaning its source code is freely available for users to inspect, modify, and contribute to. This fosters collaboration and innovation within the community.

Compatibility with Existing Tools: MindsDB is designed to work seamlessly with various data science and machine learning tools, making it adaptable to different workflows.

In summary, MindsDB is a tool that empowers users to implement machine learning models without extensive expertise in the field. It combines ease of use with a focus on explainability, making it suitable for a wide range of users, including those in data science, development, and business intelligence.

What Sets Minds Apart? 🌟

  • Tailored Problem Recommendations: Minds excels at providing problems that cater to individual skill levels, preferred difficulty, and specific company requirements. This level of customization ensures a focused and efficient preparation journey.🎯

  • Realistic Automated Mock Interviews: By simulating real-time coding interviews, users gain invaluable practice and confidence, all within the convenience of their preferred environment.β˜•πŸ‘©β€πŸ’»

  • Insightful Solution Explanations: Beyond answers, Minds supplies in-depth solution explanations, fostering a deep understanding of core concepts and algorithms. πŸ§ πŸ’‘

  • Advanced Analytics and Personalized Feedback: The chatbot provides detailed performance analytics, allowing users to monitor their progress, spot weak points, and receive tailor-made strategies for improvement. πŸ“ˆπŸš€

Why Choose Minds? πŸ€”

  • Comprehensive Interview Simulation: Minds offers a holistic interview experience that covers every aspect, from skill evaluation to real-time coding practice. πŸ’ΌπŸ’ͺ

  • Engagement Through Interaction: With engaging interactions and regular updates, users stay motivated and committed to refining their coding skills.πŸ’¬πŸ“…

  • Premium Tier for Enhanced Learning: Our premium subscription tier provides curated problem sets, advanced analytics, unlimited mock interviews, live coaching, and early access to new features, making it an enticing option for those seeking exceptional value. βœ¨πŸ”‘

Who's the Ideal Audience? 🎯

  • Aspiring Developers: Software engineers and developers gearing up for technical interviews can harness Minds tailored problem recommendations, realistic interview simulations, and comprehensive feedback. πŸ”₯πŸ‘©β€πŸ’»

  • Recruitment Agencies: Companies seeking a streamlined hiring process and efficient talent identification can rely on Mind to evaluate candidates' coding prowess effectively.πŸŽ“πŸ’

Seamless Workflow πŸ’‘

  1. Users input their target company name.

  2. Mind initiates the mock interview experience.

  3. It fetches a company-tagged coding question from the dataset.

  4. Users provide solutions, and MInds offers insightful debugging feedback.

Integration of OpenAI and Mindsdb🌐

Creating slackBot using MIndsdb requires 5-6 steps. These steps are mentioned below:

1. Decide the engine ;

I am using Langchain as ML_ENGINE to create the Minds Slackbot

CREATE ML_ENGINE langchain_engine
FROM langchain;
  1. Define the model :

     CREATE MODEL demo_model
     PREDICT answers USING
         engine = "langchain_engine",
         input_column = "question",
         api_key = "Your-key",
         mode = "conversational",
         user_column = "question",
         assistant_column = "answer",
         model_name = "gpt-4",
         verbose = True,
         prompt_template = "Answer the user input in a helpful way";
    

    This step is very important and hence I choose OpenAI gpt-4 model on the top of Langchain Engine.

    Note: Replace Your-key with the openAI key.

  2. Create SKILLs:

     CREATE SKILL query_skill USING
         type = "text_to_sql",
         file = "files",
         tables = ["leetcode"],
         description = "Technical Interview related queries bot";
    

Text to SQL (Structured Query Language):

  • Type: This indicates that you are creating a skill, specifically a "text_to_sql" skill. This skill is designed to convert natural language text (like questions) into SQL queries.

  • File: The file parameter specifies the source of your data. In this case, it seems to be a file named "files."

  • Tables: The tables parameter specifies the database tables you want to work with. In this example, it mentions a table named "leetcode."

  • Description: It provides a brief description of the skill, stating that it's for a Farmer Call Center Bot dealing with questions and answers.

Note: Leetcode is a dataset which I downloaded from Kaggle: https://www.kaggle.com/datasets/gzipchrist/leetcode-problem-dataset

  1. Agent:

     CREATE agent demo_agent USING
         model= "demo_model",
         skills= ["query_skill"];
    
    • Model: The agent is being created with a model named "demo_model." In machine learning, a model is a trained system that can make predictions or perform tasks based on input data.

    • Skills: The agent is associated with a skill named "query_skill." This skill is the text_to_sql skill you defined earlier. It means that the agent will use the capabilities of this skill, which is text-to-SQL conversion.

  2. Setup the Slack-bot on Slack application :

     CREATE DATABASE mindsdb_slack 
     WITH 
         ENGINE = 'slack', 
         PARAMETERS = { 
             "token": "" 
         };
    
  3. Create and connect Chatbot to the Agent and Salck:

     CREATE CHATBOT demo_chatbot USING 
         database = 'slack_db.mindsdb_slack',
         agent  = 'demo_agent';
    

Sample Interaction? You Got It! πŸ—£οΈπŸ’¬

After connecting to slack you can ask any question about a particular interview problem.

Here's the sample conversation b/w the user and the bot.

User: hello

Bot: Welcome! Kindly share the company you're preparing for.

User: amazon

Bot: Fantastic choice! Let's initiate the interview journey.

Bot: Question 1 -> Title: [Question Title] Description: [Question Description]

User: here's my code

Bot: Let's debug your solution:
[User's Provided Code]
Feedback: [Feedback from debugging]
Reply 'next' to proceed.

User: next

Bot: Question 2 -> Title: [Question Title] Description: [Question Description]

User: code snippet

Bot: Debugging your solution...
...

A working sample of MindsChatbot

  1. Interacting with the user

  2. Providing detailed feedback to the user

THE ERROR'S :

I encountered numerous challenges while delving into the intricacies of MindsDB. The pinnacle of my learning journey was conquering a series of hurdles, and I'm thrilled to announce that I've triumphantly crafted a Slack bot tailored for a specific domain. It was in decoding the complexities of MindsDB that I not only resolved various errors but also successfully design a bot capable of understanding natural language and converting it into SQL queries.

Therefore If someone is reading this and faced a similar problem can take this as a reference below are the errors that I faced while building Chatbot.

  1. issue with the lightwood, whenever I was running the model i was getting this.

  2. ```yaml Handler 'lightwood' cannot be used. Reason is: No module named 'lightwood'

If error is related to missing dependencies, then try to run command in shell and restart mindsdb: pip install mindsdb[lightwood]



Read the full conversation and solution here:[https://app.slack.com/client/T01RZQL72N9/C01S2T35H18/thread/C01S2T35H18-1704500031.970189](https://app.slack.com/client/T01RZQL72N9/C01S2T35H18/thread/C01S2T35H18-1704500031.970189)

1. The below error happens ***because I didn't create the ML engine first***.

2. ```yaml
      Can't find integration_record for handler 'langchain'

Here's the solution: https://app.slack.com/client/T01RZQL72N9/C01S2T35H18/thread/C01S2T35H18-1704759624.383749

The below error took me and mentor from Mindsdb community a very long time to solve thanks to the Amazind mindsdb community. The error is regarding the app token that u have to add in slack interface.

Traceback (most recent call last):
  File "/usr/local/lib/python3.10/site-packages/mindsdb/interfaces/tasks/task_thread.py", line 44, in run
    bot.run(self._stop_event)
  File "/usr/local/lib/python3.10/site-packages/mindsdb/interfaces/chatbot/chatbot_task.py", line 70, in run
    self.chat_pooling.run(stop_event)
  File "/usr/local/lib/python3.10/site-packages/mindsdb/interfaces/chatbot/polling.py", line 145, in run
    self.chat_task.chat_handler.subscribe(stop_event, self._callback, t_params['name'])
  File "/usr/local/lib/python3.10/site-packages/mindsdb/integrations/handlers/slack_handler/slack_handler.py", line 395, in subscribe
    app_token=self.connection_args['app_token'],  # xapp-A111-222-xyz
KeyError: 'app_token'

Here's the full info and sol abt this problem: https://app.slack.com/client/T01RZQL72N9/C01S2T35H18/thread/C01S2T35H18-1704761029.041769

Motivation:

Special mention to this blog https://imsadra.me/introducing-hey-your-ai-powered-pair-programming-friend which motivates me to make this bot, particularly for the interview POV. I tried to create the CLI or website for this but due to less time am concluding this at this point only, In future I will for sure create the CLI as well for this.

Tech stack:

  1. Docker

  2. Git& GitHub

  3. SQL

  4. AI/ML

  5. NLP

  6. MindsDB

Resources

GitHub Repo: https://github.com/Vikash-8090-Yadav/Minds

Demonstration Video: https://youtu.be/pl7VgiEMZRY

MIndsdb docs: https://docs.mindsdb.com/sql/tutorials/slack-chatbot

Tutorials: https://www.youtube.com/watch?v=egw1S9T3wUA, https://www.youtube.com/watch?v=MSYR6RHW9Zk

Special Thanks πŸ”₯

I'm truly happy about the partnership between Hashnode and MindsDB that made up this amazing hackathon. Their great services and wholesome support are appreciatable. 🍺

Β