Thinking rocks when you use thinking rocks.
"how we turn sand into intelligence" - THE best video on CPUs
https://platform.openai.com/docs/introduction
Interview Prep Bot is a tool designed to assist job seekers in preparing for interviews. By providing the company name, desired role, and a detailed job description, users can receive potential interview questions tailored to their specific situation.
- User-Friendly Interface: Built with Streamlit, the app offers a simple and intuitive UI for users to input necessary details.
- Heuristic-Based Question Generation: Generates relevant interview questions based on the provided job description.
- Support for Multiple Roles and Companies: Versatile enough to generate questions for a wide range of roles and companies.
- Python 3.1x
- Pipenv
- Clone the repository:
git clone https://github.com/your-username/thinking-rocks.git
- Navigate to the project directory:
cd thinking-rocks
- Install the required packages using Pipenv:
pipenv install
- Activate the virtual environment:
pipenv shell
- Run the application with Streamlit:
streamlit run app.py
- Navigate to the displayed URL in your web browser to access the Interview Prep Bot.
Streamlit offers a way to manage secrets which might be needed by your app, such as API keys. These secrets can be stored in .streamlit/secrets.toml
, ensuring they're not exposed in the application code.
-
Create a Secrets File: In your project directory, create a folder named
.streamlit
if it doesn't exist. Inside.streamlit
, create a file namedsecrets.toml
. -
Add Your Secrets: Open
secrets.toml
with your favorite text editor and add your secrets in TOML format:
# .streamlit/secrets.toml
OPENAI_API_KEY = "XXXXXXXXXXX"
SERP_API_KEY = "XXXXXXXXXXX"
BROWSERLESS_API_KEY = "XXXXXXXXXXX"
- Accessing Secrets in Your App: In your Streamlit app, you can access these secrets using:
import streamlit as st
api_key = st.secrets["api_key"]
db_username = st.secrets["db_username"]
db_password = st.secrets["db_password"]
- Ensure File is Git Ignored: To make sure your secrets file isn't checked into Git, add
.streamlit/secrets.toml
to your.gitignore
file:
# .gitignore
.streamlit/secrets.toml
Always ensure that your secrets file is not exposed or shared. This method keeps your secrets out of your application code, but you should always ensure the security of any environment in which you're deploying your app.
- User Input: The user provides the company name, desired role, and a detailed job description.
- Research and Generation: The bot searches for relevant content online, extracts information, and uses heuristic-based logic to generate potential interview questions.
- Display Results: The generated questions are displayed to the user, providing insights into what they might be asked during the interview.
During the development of Interview Prep Bot, we encountered several challenges:
-
Relevance of Generated Questions: The initial version often produced questions focused on the interview experience rather than the job role. This was addressed by implementing heuristic-based logic, leveraging keywords from the provided job description.
-
Text Formatting Issues: Some questions were concatenated without spaces or had duplicate numbering. We refined our text processing logic to handle and correct these formatting anomalies.
-
Dependency Management: To ensure smooth deployment and collaboration, we utilized Pipenv for dependency management and created a
requirements.txt
for easy setup.
If you'd like to contribute, please fork the repository and make changes as you'd like. Pull requests are warmly welcome.
- OpenAI's ChatGPT: For guidance and assistance in refining the bot's logic.
- Streamlit: For providing a platform to turn the bot into a web application, making it more accessible to users.
- NLTK library: For NLP tools and utilities.
- BeautifulSoup: For its invaluable web scraping capabilities, enabling the extraction of relevant content.
- LangChain: For their advanced language processing capabilities which significantly enhanced the quality and relevance of our application's outputs.
Employing Heuristics to Improve Question Relevance in Interview Prep Bot
Accepted
The initial version of the Interview Prep Bot used a relatively straightforward approach to generate interview questions based on the role and company name provided by the user. However, the generated questions often focused on the interview experience itself rather than being directly relevant to the job role. To improve the relevance of these questions, a more sophisticated approach was needed.
To address this issue, we decided to implement a heuristic-based approach that leveraged the job description provided by the user. This approach involved:
-
Keyword Extraction from Job Description:
- Extracted important keywords and phrases from the user-provided job description using the NLTK library.
- Utilized these keywords to guide the generation of questions, ensuring that they are more aligned with the job role's specifics.
-
Filtering Heuristics:
- Implemented filters to eliminate questions that focused primarily on the interview experience.
- Prioritized questions that seemed more directly related to the actual job role and responsibilities, as well as the company culture.
-
Question Formatting:
- Added logic to handle and correct text formatting issues, ensuring that the generated questions are well-phrased and readable.
By employing these heuristics, the aim was to create a list of questions that a potential candidate might realistically be asked during an interview for the provided job role.
- Improved Relevance: The generated questions are now more directly relevant to the user's input job role and description, providing better utility and value to the user.
- Increased Complexity: The added heuristics and keyword extraction logic increased the complexity of the code. However, the benefits in terms of question quality outweigh the drawbacks.
- Dependency on Job Description Quality: The effectiveness of the heuristic approach is somewhat dependent on the quality and detail of the provided job description. A generic or vague job description might still result in less relevant questions.
- Flexibility for Future Enhancements: The heuristic-based approach provides a foundation upon which further refinements and enhancements can be built, such as incorporating more advanced NLP techniques or feedback mechanisms.
October 12, 2023
This ADR documents the rationale behind the decision to employ a heuristic-based approach to improve the relevance of generated interview questions in the Interview Prep Bot. Future refinements and adjustments to this approach can be documented in subsequent ADRs.