Finals
Finals
Finals
A Main project thesis submitted in partial fulfillment of requirements for the award
of degree for VIII semester
by
J.BHAVYA SRI (20131A4223)
RAMEEZ AHMAD (20131A04245)
NUZHATH TAHSEEN (21145A4204)
P.VIJAYASIMHA REDDY (21135A4205)
1
CERTIFICATE
This is to certify that the main project entitled “AI-Powered Interview Assistant”
being submitted by
The results embodied in this record have not been submitted to any other
university or institution for the award of any Degree or Diploma.
We would like to express our deep sense of gratitude to our esteemed institute
Gayatri Vidya Parishad College of Engineering (Autonomous), which has provided
us an opportunity to fulfill our cherished desire.
We express our profound gratitude and our deep indebtedness to our guide
We also thank our coordinator, Dr. CH. SITA KUMARI, Associate Professor,
Department of Computer Science and Engineering, for the kind suggestions and guidance
for the successful completion of our project work.
The challenge is posed by inflexible schedules and set interview timelines, which make it
difficult for students to connect theoretical knowledge with the practical skills necessary
in the competitive tech industry. It's crucial for students to continuously adapt and acquire
advanced skills to stay relevant in the face of rapid technological advancements..
With technology evolving rapidly, students must continually acquire advanced skills to
remain competitive. While current models contribute to skill development, they often fall
short in providing personalized one-on-one interview experiences.
Our proposed approach leverages OpenAI keys and LangChain models to revolutionize
interview preparation by generating tailored questions from user resumes, enhancing the
learning experience. Streamlit facilitates seamless interaction, while OpenAI integration
enhances simulation sophistication, bridging the gap between theory and practice. This
comprehensive solution represents a paradigm shift, empowering students to excel
confidently in job interviews.
CHAPTER 1. INTRODUCTION.................................................................1
1.1 Objective…...........................................................................1
1.2 About the Algorithm............................................................2
1.3 Purpose…..............................................................................5
1.4 Scope….................................................................................6
CHAPTER 2. SRS DOCUMENT................................................................7
2.1 Functional Requirements..................................................7
2.2 Non-functional Requirements...........................................7
2.3 Minimum Hardware Requirements...................................8
2.4 Minimum Software Requirements....................................8
FUTURE SCOPE...............................................................74
REFERENCE LINKS.......................................................75
1. INTRODUCTION
1.1 OBJECTIVE
In our algorithm, we aim to develop a robust system for efficient document retrieval and
processing, leveraging advanced techniques such as document loaders, text splitting,
embedding models, vector stores, retrievers, and indexing. This algorithmic framework is
crucial for enabling streamlined access to information, enhancing search capabilities, and
facilitating seamless integration with user interfaces.
Text Loader:
The Text Loader component serves as a foundational element in our system, responsible
for sourcing textual documents from various data repositories. By seamlessly interfacing
with diverse sources including local files and cloud-based storage solutions, Text Loader
ensures the reliable acquisition of data essential for subsequent processing and analysis.
The Unstructured URL Loader expands our system's capabilities by enabling the retrieval
of unstructured data from web sources. Through sophisticated web scraping techniques,
this component facilitates the extraction of information from publicly accessible URLs,
enriching our dataset with external content for comprehensive analysis and insight
generation.
Text Splitter efficiently breaks down large documents into manageable chunks,
enhancing processing efficiency and enabling targeted analysis. Coherent Chunking:
Utilizes advanced algorithms to ensure that text chunks maintain coherence and
relevance, preserving the contextual integrity of the original document. Optimized
Processing: By segmenting text into smaller units, Text Splitter optimizes subsequent
retrieval and analysis processes, facilitating faster and more accurate information
extraction.
FIASS
FAISS supports essential functionalities like CRUD operations and metadata filtering,
simplifying data management. Additionally, FAISS enables horizontal scaling,
distributing index structures across multiple machines for enhanced performance and
scalability. As a cornerstone technology, FAISS empowers AI systems with swift and
precise retrieval of semantic information
1.5.1 Retrieval:
Retrieval mechanisms orchestrate the process of fetching relevant data based on user
queries, bridging the gap between raw data and actionable insights. The
RetrievalQAWithSourcesChain leverages sophisticated algorithms to identify and
retrieve pertinent information, taking into account multiple data sources and query types.
By employing techniques such as semantic search and ensemble retrieval, it enhances the
precision and comprehensiveness of search results, empowering users with actionable
knowledge
RetrievalQAWithSourcesChain
The purpose of the provided code and application is to streamline and enhance the
interview preparation process for job seekers. By leveraging advanced technologies such
as Streamlit, LangChain, and OpenAI, the application offers a sophisticated platform for
generating personalized technical interview questions based on the content of uploaded
resumes.
Through seamless integration with document loaders and text splitters, the
application efficiently extracts relevant information from resumes, ensuring that
generated questions are tailored to each candidate's unique skills and experiences.
Additionally, the incorporation of audio recording functionality allows candidates
to verbally respond to interview questions, fostering dynamic and immersive preparation
sessions. The application's objective is to empower job seekers with the tools and
resources needed to confidently navigate the interview process and secure their desired
career opportunities.
Overall, the code and application aim to revolutionize interview preparation by
providing a user-friendly interface, intelligent question generation capabilities, and
interactive features for audio-based responses.
By combining cutting-edge technologies with a focus on user-centric design, the
application strives to enhance the efficiency, effectiveness, and confidence of job seekers
as they prepare for interviews. With its comprehensive approach and innovative features,
the application sets out to redefine the standard for interview preparation in the modern
job market.
At its core, the application seeks to empower individuals with a strategic
advantage in their career pursuits. Through intelligent question generation and
personalized feedback mechanisms, it fosters a deeper understanding of one's strengths
and areas for improvement, enabling candidates to showcase their capabilities with
confidence and precision during interviews.
1.4 SCOPE
Python based Computer Vision and Deep Learning libraries will be exploited for
the development and experimentation of the project.
OpenAI's high API usage costs and ethical concerns regarding biases in
question generation may hinder its suitability for large-scale interview
preparation. Similarly, platforms like Gemini may lack customization, while
Hugging Face's models might require complex integration and lack
specialized capabilities, contrasting with the project's objectives.
Brad.ai's focus on coaching may not align with automated question
generation goals, and 1:1 mock interviews could lack scalability compared
to automated systems. Concerns arise over the cost and ethics of OpenAI's
language models, while Gemini's focus on scheduling may limit
customization.
Integrating Hugging Face's models may be complex, lacking specialized
capabilities, and Brad.ai's coaching emphasis might not align with the
project's aims. 1:1 mock interviews could lack scalability compared to
automated systems.
It is very time-saving
Dynamic Question Generation
Accurate results
Automated Resume Parsing
User- friendly graphical interface
Highly reliable
Cost effective
• What are the alternatives among which a solution will be chosen (During
subsequent phases)
• To analyze if the software meets organizational requirements. There are
various types of feasibility that can be determined. They are:
Operational - Define the urgency of the problem and the acceptability of any
solution, includes people-oriented and social issues: internal issues, such as
manpower problems, labor objections, manager resistance, organizational conflicts,
and policies; also, external issues, including social acceptability, legal aspects, and
government regulations.
Technical: Is the feasibility within the limits of current technology? Does the
technology exist at all? Is it available within a given resource?
Economic - Is the project possible, given resource constraints? Are the benefits that
will accrue from the new system worth the costs? What are the savings that will
result from the system, including tangible and intangible ones? What are the
development and operational costs?
The financial and the economic questions during the preliminary investigation are
verified to estimate the following:
• The cost of the hardware and software for the class of application being
considered.
• The benefits in the form of reduced cost.
• The proposed system will give the minute information, as a result.
• Performance is improved which in turn may be expected to provide
increased profits.
• This feasibility checks whether the system can be developed with the
available funds.
• This can be done economically if planned judicially, so it is economically
feasible.
The cost of the project depends upon the number of man-hours required
4. SOFTWARE DESCRIPTION
4.2. Langchain
4.3. Python
4.4 Open AI
4.5 Pycharm
PyCharm stands as a premier integrated development environment (IDE)
meticulously crafted for Python programming, renowned for its robust features and
user-friendly interface. Developed by JetBrains, PyCharm offers a comprehensive
suite of tools designed to enhance the productivity and efficiency of Python
developers. Its intelligent code completion, advanced debugging capabilities, and
seamless integration with version control systems streamline the development
workflow. PyCharm provides support for various Python frameworks and libraries,
facilitating the creation of diverse applications ranging from web development to
data analysis and machine learning. With its extensive plugin ecosystem and
customizable settings, PyCharm caters to the unique needs of developers, enabling
them to build high-quality software with ease. Whether working on personal
projects or large-scale enterprise applications, PyCharm remains a preferred choice
for Python developers seeking a feature-rich and intuitive development
environment.
4.6 Streamlit
Streamlit is a Python library that simplifies the creation of interactive web
applications for data science and machine learning projects. It offers a
straightforward and intuitive way to build user-friendly interfaces without the need
for extensive web development experience. With Streamlit, developers can
seamlessly integrate data visualizations, input widgets, and text elements to create
dynamic applications that enable users to explore and interact with data in real-
time. Its declarative syntax and automatic widget rendering make prototyping and
deploying applications quick and efficient. Streamlit's seamless integration with
popular data science libraries like Pandas, Matplotlib, and TensorFlow further
enhances its capabilities, allowing developers to leverage their existing knowledge
and tools. Overall, Streamlit empowers data scientists and machine learning
engineers to share insights, prototypes, and models with stakeholders effectively,
accelerating the development and deployment of data-driven applications.
5. PROBLEM DESCRIPTION
Our project's primary goal is to assist users , particularly technical students, in preparing
for job interviews effectively. By allowing users to record their answers using audio
input, the system aims to facilitate practice and improvement, ultimately enhancing their
interview performance and boosting confidence levels.
The output of our project is a user-friendly interface where technical students can
upload their resumes and final result is to provide a score between 0 to 100 and for each
question along with the areas of improvement.
5.3.2. MODEL
Fig 5.2
Model
Error Handling and Overall Application Workflow
The script encompasses robust error handling mechanisms to gracefully navigate
exceptions that may arise during execution. Instances of errors, such as file upload or
audio recording mishaps, prompt the display of informative error messages, preserving a
seamless user experience. Throughout the codebase, various control flow structures,
including conditional statements and loops, orchestrate the application's workflow and
handle diverse scenarios adeptly. Modular code architecture enhances maintainability and
readability, facilitating comprehension and modification endeavors. In sum, the script
embodies adept utilization of libraries and tools, such as Streamlit, PyPDF2, and
LangChain, culminating in the development of an interactive and user-centric application
tailored for personalized interview preparation.Error Handling and Overall Application
Workflow The script encompasses robust error handling mechanisms to gracefully
navigate exceptions that may arise during execution. Instances of errors, such as file
upload or audio recording mishaps, prompt the display of informative error messages,
preserving a seamless user experience. Throughout the codebase, various control flow
structures, including conditional statements and loops, orchestrate the application's
workflow and handle diverse scenarios adeptly. Modular code architecture enhances
maintainability and readability, facilitating comprehension and modification endeavors.
In sum, the script embodies adept utilization of libraries and tools, such as Streamlit,
PyPDF2, and LangChain, culminating in the development of an interactive and user-
centric application tailored for personalized interview preparation.
In the project, LangChain's LLM (Language Learning Model) plays a crucial role in
generating tailored interview questions based on the content of uploaded resumes.
Leveraging advanced natural language processing techniques, the LLM comprehensively
analyzes the textual data to identify relevant skills and experiences. It then formulates
personalized questions to simulate real-world interview scenarios. Additionally, the LLM
evaluates user responses, providing constructive feedback and areas for improvement. By
harnessing the power of the LLM, the project enhances interview preparation by offering
dynamic and targeted question-answering interactions, ultimately empowering users to
refine their technical communication skills.
The PdfReader() class initializes a PdfReader object, allowing the script to read the
content of PDF files.
The extract_text() method is then utilized to extract text content from individual
pages of the PDF, enabling further processing and analysis
The load_qa_chain() function is responsible for loading a question-answering chain
for processing documents. This chain is essential for generating responses to user
queries based on the content of the documents provided.
Similarly, the get_openai_callback() function retrieves an OpenAI callback function,
which is crucial for interacting with OpenAI's API during the question-answering
process. These functions encapsulate complex logic and functionality, enabling
streamlined document processing and response generation.
The record_audio() function facilitates audio recording for a specified duration
using the sounddevice library and saves the recorded audio to a temporary WAV
file. This functionality is vital for allowing users to provide verbal responses to
interview questions, adding an interactive element to the application.
Additionally, the convert_audio_to_text() function leverages the Google Speech
Recognition API to convert recorded audio files to text format. This conversion
enables seamless integration of spoken responses into the question-answering
workflow.
• A lot of time is saved down the line when teams can visualize processes,
user interactions and static structure of the system.
UML is linked with object-oriented design and analysis. UML makes the
use of elements and forms associations between them to form diagrams. Diagrams
in UML can be broadly classified as:
Building Blocks of the UML Building Blocks of the UML Building Blocks of the
UML
• Things
• Relationships
• Diagrams
Things are the abstractions that are first-class citizens in a model; relationships tie
these things together; diagrams group interesting collections of things.
3.3.2 Things in the UML
• Structural things
• Behavioural things
• Grouping things
• Annotational things
These things are the basic object-oriented building blocks of the UML. You use
them to write well-formed models.
Structural things are the nouns of UML models. These are the mostly static
parts of a model, representing elements that are either conceptual or physical.
Collectively, the structural things are called classifiers.
Class - A Class is a set of identical things that outlines the functionality and
properties of an object. It also represents the abstract class whose functionalities are
not defined. Its notation is as follows
Use Case - A sequence of actions that a system performs that yields an observable
result. Used to structure behavior in a model. Is realized by collaboration.
Node - A physical element existing at run time and represents are source.
3.3.4 Behavioral Things
Behavioral things are the dynamic parts of UML models. These are the verbs of a
model, representing behavior over time and space. In all, there are three primary
kinds of behavioral things
• Interaction
• State machine
3.3.5 Interaction
Package − Package is the only one grouping thing available for gathering structural
and behavioural things.
• Dependency
• Association
• Generalization
• Realization
3.3.10 Dependency
It is an element (the independent one) that may affect the semantics of the other
element (the dependent one). Graphically, a dependency is rendered as a dashed
line, possibly directed, and occasionally including a label.
3.3.11 Association
Association is basically a set of links that connects the elements of a UML
model. It also describes how many objects are taking part in that relationship.
3.3.12 Generalization
It is a specialization/generalization relationship in which the specialized
element (the child) builds on the specification of the generalized element (the
parent). The child shares the structure and the behavior of the parent. Graphically, a
generalization relationship is rendered as a solid line with a hollow arrowhead
pointing to the parent.
3.3.13 Realization
Realization can be defined as a relationship in which two elements are
connected. One element describes some responsibility, which is not implemented
and the other one implements them. This relationship exists in case of interfaces.
6.3 UML DIAGRAMS
• Class diagram
• Object diagram
• Component diagram
• Composite structure diagram
• Use case diagram
• Sequence diagram
• Communication diagram
• State diagram
• Activity diagram
7.1. RAW
DATA
7.2. SAMPLE CODE
app.py
import streamlit as st
import pickle
from PyPDF2 import PdfReader
from langchain.text_splitter import RecursiveCharacterTextSplitter
from langchain.embeddings.openai import OpenAIEmbeddings
from langchain.vectorstores import FAISS
from langchain.llms import OpenAI
from langchain.chains.question_answering import load_qa_chain
from langchain.callbacks import get_openai_callback
import os
import time
import sounddevice as sd
import soundfile as sf
import tempfile
import speech_recognition as sr
# Sidebar contents
with st.sidebar:
st.markdown('''
## About
References used for building the APP:
- [Streamlit](https://streamlit.io/)
- [LangChain](https://python.langchain.com/)
- [OpenAI](https://platform.openai.com/docs/models) LLM model
''')
# Sample rate
fs = 44100
# Default recording duration
duration = 60
# Main function
def main():
main_placeholder.text("Data Loading...Started...✅✅✅")
# Generate questions
query = f"Give {st.session_state.n} technical questions on the skills and
projects from the above pdf"
if query:
docs = st.session_state.vectorstore.similarity_search(query=query, k=3)
llm = OpenAI(model_name="gpt-3.5-turbo-instruct", temperature=0.6,
max_tokens=500)
chain = load_qa_chain(llm=llm, chain_type="stuff")
with get_openai_callback() as cb:
response = chain.run(input_documents=docs, question=query)
if not st.session_state.questions:
st.session_state.questions = list(response.split('?'))[0:-1]
st.header("Questions")
for i, question in enumerate(st.session_state.questions):
st.write(f"{question}")
start_recording = st.button(f"Start Answering {i+1}")
if start_recording:
st.write("Listening...")
audio_file = record_audio(duration, fs)
st.write("Time's up!")
query = f"""Analyze all the above questions and corresponding answers and give
a score between 0 to 100 and also provide the areas of improvement for betterment of the
candidate. The list of questions and answers are as follows, providing a review only for
answered questions: {str(st.session_state.recorded_answers)}. Give analysis for every
question and corresponding answer. The format of the review is '[Question number] :
[score]/100 Areas of improvement: [suggestions to improve]'. Every question's response
should be separated by '###'. For example:
Question 2: Score - N/A Areas of improvement: The candidate did not provide an
answer for this question, so no score or areas of improvement can be given
and question number starts from 1.Please give each answer in a newline"""
count = 0
for i, question in enumerate(st.session_state.questions):
if st.session_state.recorded_answers[i]["Answer"] != "Not Answered Yet":
count += 1
except Exception as e:
st.error(f"An error occurred: {str(e)}")
Testing is of different ways The main idea behind the testing is to reduce the errors and
do it with a minimum time and effort.
• Security: It is the most vulnerable and sensitive benefit of software testing. People
are looking for trusted products. It helps in removing risks and problems earlier.
Integration Testing: Integration tests verify that different modules or services used by
your application work well together. For example, it can be testing the interaction with
the database or making sure that microservices work together as expected. These types
of tests are more expensive to run as they require multiple parts of the application to be
up and running.
There is sometimes a confusion between integration tests and functional tests as they
both require multiple components to interact with each other. The difference is that an
integration test may simply verify that you can query the database while a functional test
would expect to get a specific value from the database as defined by the product
requirements.
Regression Testing: Regression testing is a crucial stage for the product & very useful
for the developers to identify the stability of the product with the changing requirements.
Regression testing is a testing that is done to verify that a code change in the software
does not impact the existing functionality of the product.
System Testing: System testing of software or hardware is testing conducted on a
complete integrated system to evaluate the system’s compliance with its specified
requirements. System testing is a series of different tests whose primary purpose is to
fully exercise the computer-based system.
Performance Testing: It checks the speed, response time, reliability, resource usage,
scalability of a software program under their expected workload. The purpose of
Performance Testing is not to find functional defects but to eliminate performance
bottlenecks in the software or device.
Alpha Testing: This is a form of internal acceptance testing performed mainly by the in-
house software QA and testing teams. Alpha testing is the last testing done by the test
teams at the development site after the acceptance testing and before releasing the
software for the beta test. It can also be done by the potential users or customers of the
application. But still, this is a form of in-house acceptance testing.
Beta Testing: This is a testing stage followed by the internal full alpha test cycle. This is
the final testing phase where the companies release the software to a few external user
groups outside the company test teams or employees. This initial software version is
known as the beta version. Most companies gather user feedback in this release.
White Box Testing: White box testing (also known as Clear Box Testing, Open Box
Testing, Glass Box Testing, Transparent Box Testing, Code-Based Testing or Structural
Testing) is a software testing method in which the internal
structure/design/implementation of the item being tested is known to the tester. The
tester chooses inputs to exercise paths through the code and determines the appropriate
outputs. Programming know-how and the implementation knowledge is essential. White
box testing is testing beyond the user interface and into the nitty-gritty of a system. This
method is named so because the software program, in the eyes of the tester, is like a
white/transparent box; inside which one clearly sees.
Fig 8.1.2 Whitebox Testing
8. CONCLUSION
Both benefits and drawbacks exist with our project. On the positive side, it automates
question generation and response recording, streamlining the interview preparation
process. Additionally, it provides personalized feedback and analysis, enhancing
candidate performance and confidence. However, reliance on machine learning
algorithms may introduce biases or inaccuracies in question generation, impacting the
quality of interview practice. Our system may not fully replicate the nuances of human
interaction in interview scenarios, and users should supplement their preparation with
real-world practice and feedback.
The main challenge that we faced while working on this project was the need for internet
connectivity and API access may limit accessibility and usability in certain environments.
9. FUTURE SCOPE
The future scope of our project is expansive, driven by our overarching objective of
revolutionizing interview preparation processes.
We continue to refine our system, we aim to leverage cutting-edge technologies to
enhance user experience and effectiveness.
This includes exploring advanced natural language processing techniques to generate
more contextually relevant and diverse interview questions.
Additionally, we envision integrating machine learning algorithms to provide
personalized feedback and performance analytics to users.
Moreover, we plan to expand the application's capabilities by incorporating features such
as mock interview simulations and industry-specific question sets.
These enhancements will ensure that our platform remains at the forefront of interview
preparation innovation, catering to diverse user needs and preferences.
Therefore, these are some upcoming upgrades or enhancements that we intend to
make.
10. REFERENCE LINKS
Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.
Alternative Proxies: