Interview Questions

AI/ML & GEN AI

1. What is Data Chunking?

Data Chunking is the process of splitting large documents into
smaller pieces (chunks) so AI models can process and retrieve
information efficiently.


Benefits:

  • Improves search accuracy
  • Reduces token limit issues
  • Speeds up retrieval

2. Define Vector Database

A Vector Database is a database that stores vector embeddings (numerical
representations of data) and performs similarity searches to find relevant
information.

It is mainly used in AI applications such as semantic search, chatbots, and
RAG systems.

3. How to Retrieve Data in a Vector Database?

Steps:

  1. Convert the user's query into an embedding.
  2. Compare it with stored vectors using similarity search.
  3. Retrieve the top matching results.
  4. Send the retrieved data to the LLM to generate the final answer.

Flow:

User Query → Embedding → Similarity Search → Relevant Documents →
LLM → Final Answer

This process is called RAG (Retrieval-Augmented Generation).

4. What is MCP?

MCP (Model Context Protocol) is an open standard developed by Anthropic
that enables AI models to connect with external tools, databases, and
applications using a common protocol.

Benefits:

  • Standardized integration
  • Secure communication
  • Easy tool connectivity

5. What is FastMCP?

MCP (Model Context Protocol) is an open standard developed by Anthropic
that enables AI models to connect with external tools, databases, and
applications using a common protocol.

Benefits:

  • Standardized integration
  • Secure communication
  • Easy tool connectivity

6.How can we increase the size of the Context Window?

We cannot directly increase it, but we can optimize it by:

  • Using larger context models
  • Applying data chunking
  • Summarizing previous conversations
  • Using RAG (Retrieval-Augmented Generation)

7.What ha ppens when we activate the Deep Thinking feature in ChatGPT?

When Deep Thinking is enabled, the model spends more time analyzing the problem, breaking it into smaller steps, and producing more detailed and accurate responses for complex tasks.

8.What are the too ls used for model fine-tuning?

Common tools are:

  • Hugging Face
  • PyTorch
  • TensorFlow
  • Keras
  • MLflow

9.What is AW S Bedrock?

Amazon Bedrock is a fully managed AWS service that allows developers to
build and deploy Generative AI applications using foundation models
without managing infrastructure.

10.What is a Context Window?

A Context Window is the amount of information (tokens) an AI model can
process and remember in a single interaction. It includes prompts,
conversation history, and uploaded data.

11. hat is the Attention Mechanism?

The Attention Mechanism helps a model focus on the most important parts of the input while generating an output, improving understanding and accuracy.

12. What other mode ls have you worked with besides ChatGPT?

Examples:

  • Google Gemini
  • Claude
  • Llama
  • Mistral

13. How wi ll you work on share market data? What algorithms are used?

Common algorithms include:

  • Linear Regression
  • ARIMA
  • LSTM
  • Prophet
  • Random Forest
  • XGBoost

These are used for trend analysis and price prediction.

14. In what kind of databases will we store ML/DL data?

Common databases:

  • SQL databases
  • NoSQL databases
  • Data warehouses
  • Vector databases

Examples include MySQL, PostgreSQL, MongoDB, and Pinecone.

15. What a lgorithms are used for Time Series data?

Common algorithms:

  • ARIMA
  • SARIMA
  • Prophet
  • LSTM
  • Exponential Smoothing

16. hat are the im portant components of Time Series data?

The four main components are:

  • Trend
  • Seasonality
  • Cyclic patterns
  • Noise

17. How wi ll you handle missing or noisy data in ML?

Techniques include:

  • Remove duplicate records
  • Fill missing values using mean, median, or mode
  • Interpolate missing values
  • Detect and remove outliers
  • Apply data normalization or standardization

18. If you have 2 years of Time Series data, how will you calculate the median?

  1. Sort all values in ascending order.
  2. Find the middle value.
  3. If there are two middle values, take their average.

19. How wi ll you find outliers in the data?

Common methods:

  • IQR (Interquartile Range)
  • Z-Score
  • Box Plot
  • Standard Deviation

20. How wi ll you import data into a Machine Learning model?

Common steps:

  • Load the dataset using libraries like Pandas.
  • Clean and preprocess the data.
  • Split the data into training and testing sets.
  • Feed the processed data into the ML model.

21. What are the t ypes of models available in Machine Learning?

Machine Learning models are mainly classified into:

  • Supervised Learning
  • Unsupervised Learning
  • Semi-Supervised Learning
  • Reinforcement Learning

22. How do we a pply Linear Regression?

Linear Regression is used to predict a continuous value by finding the relationship between independent and dependent variables.

Steps:

  • Prepare the dataset.
  • Split it into training and testing data.
  • Train the Linear Regression model.
  • Predict and evaluate the results.

23. w can we feed forecast data in Linear Regression?

Use historical data as input features and time-related variables (day, month, year, previous values) to train the model and predict future values.

24. What is AR IMA and how is it used in Time Series data?

ARIMA (AutoRegressive Integrated Moving Average) is a forecasting algorithm used to analyze historical patterns and predict future values in time-series data. It works well for non-seasonal time-series data.

25. How does LSTM work with forecasting data?

LSTM (Long Short-Term Memory) is a type of recurrent neural network that learns patterns from sequential data and remembers long-term dependencies to predict future values.

26. How do we train data stored for the past 7 days?

Collect the last 7 days of data, preprocess it, convert it into sequences, and use it to train a forecasting model such as LSTM.

27. How does LSTM work on the last 7 days of data? (Theory)

LSTM takes the previous 7 days as input, learns the patterns and dependencies, and predicts the next value based on those patterns.

28. How can we arrange Time Series data in an ML model?

Arrange the data chronologically with:

  • Timestamp
  • Features
  • Target values

Never shuffle time-series data.

29. What is the Bias-Variance Tradeoff?

It is the balance between:

  • Bias: Errors due to oversimplification (underfitting)
  • Variance: Errors due to over-complexity (overfitting)

The goal is to achieve a balance for better model performance.

30. What is Batch Normalization?

Batch Normalization normalizes data between layers during training to improve speed, stability, and model performance.

31. What is Gradient Limiting?

Gradient Clipping limits gradient values during training to prevent exploding gradients and stabilize the learning process.

32. What is L1 and L2 Regularization?

L1 Regularization: Adds a penalty that can reduce some feature weights to zero. L2 Regularization: Adds a penalty that reduces feature weights but usually does not make them zero. Both help reduce overfitting.

33. What are Embeddings and Vectors?

Embeddings are numerical representations of data. Vectors are the numerical arrays used to represent the semantic meaning of text, images, or audio.

34. What is C lass Imbalance?

Class imbalance occurs when one class has significantly more samples than another, causing biased predictions. Techniques to solve it:

  • Oversampling
  • Undersampling
  • SMOTE

35. What is Transfer Learning?

Transfer Learning is reusing a pre-trained model for a new task instead of training a model from scratch.

36. Explain the end-to-end flow of a RAG Pipeline.

Flow:
Data Source → Chunking → Embedding → Vector Database → User Query → Similarity Search → Retrieved Data → LLM → Final Response

37. What is Semantic Search?

Semantic Search finds information based on meaning and context rather than exact keyword matching.

38. What are Ha llucinations? Can they be controlled?

Semantic Search fiHallucinations are incorrect or fabricated responses generated by an LLM. They can be reduced using:

  • RAG
  • Better prompts
  • Fine-tuning Reliable data sourcesnds information based on meaning and context rather than exact keyword matching.

39. Have you worked on any open-source models?

Examples:

  • Llama
  • Mistral
  • Gemma

40. What are Zero-shot, One-shot, and Few-shot Prompting?

Zero-shot: No examples are provided.

One-shot: One example is provided.

Few-shot: Multiple examples are provided.

Register Your Demo Slot

    Quick Enquiry




      Register to Achieve Your Dream Career


        Wait!! Don't skip your Dream Career

        Enroll Today & Start Your Learning Journey

          Get in Touch with us


            5 + 6 =