AI Interview Questions and Answers
1. What Is Artificial Intelligence?
Answer: Artificial Intelligence is an area of computer science that emphasizes the creation of an intelligent machine that works and reacts like humans. (ai interview questions)
2. What is the Depth-First Search Algorithm?
Answer: The Depth-First Search (DFS) algorithm is a recursive algorithm that uses the method of backtracking. It involves extensive traversing through all the nodes by going ahead, if possible, else by backtracking.
When you are moving forward and there are no more nodes left along the current path, you go back on the same path to find new nodes to traverse. The next path will only be selected if all the nodes on the current path will be visited. DFS is performed using the stack and it goes as follows:
Pick a source/starting node and push all the adjacent nodes into a stack. Now pick a node from the stack to select the next node to visit and push all its adjacent nodes into a stack.
Repeat the process until the stack is empty. To ensure that all the visited nodes are marked, as this will prevent you from re-visiting the same node. If you do not mark the visited nodes and you may visit the same node more than once and end up in an infinite loop.
3. What are dropouts?
Answer: Dropout is a simple way to prevent a neural network from overfitting. It is the dropping out of some of the units in a neural network. It is similar to the natural reproduction process, where nature produces offsprings by combining distinct genes (dropping out others) rather than strengthening the co-adapting of them.
4. How to run TensorFlow on Hadoop?
Answer: To use HDFS with TensorFlow, we need to change the file path for reading and writing data to an HDFS path. For example:
5. What are the intermediate tensors? Do sessions have lifetime?
Answer: The intermediate tensors are tensors that are neither inputs nor outputs of the Session.run() call, but are in the path leading from the inputs to the outputs; they will be freed at or before the end of the call.
Sessions can own resources, few classes like tf. Variable, tf.QueueBase, and tf.ReaderBase and they use a significant amount of memory. These resources (and the associated memory) are released when the session is closed, by calling tf.Session.close.
6. Which is the best way to go for the Game playing problem?
Answer: A heuristic approach is the best way to go for game playing problem, as it will use the technique based on intelligent guesswork. For example, Chess between humans and computers as it will use brute force computation, looking at hundreds of thousands of positions.
7. What is the Hidden Markov Model (HMMs is used?
Answer: Hidden Markov Models are a ubiquitous tool for modeling time series data or to model sequence behavior. They are used in almost all current speech recognition systems.
8. What is informed (Heuristic Search Strategies Algorithm?
Answer: To increase the efficiency of the search algorithm we need to add problem-specific knowledge. We use this to solve large problems with a large number of possible states
A. Heuristic Evaluation Functions
We use this function to calculate the path between two states that a function takes for sliding-tiles games. which we have to calculate by computing the number of rows. Also, the moves of each tile make from its goal state. Further, adding this number of moves for all tiles.
b. Pure Heuristic Search
In order, if heuristic value nodes will expand. Also, creates two lists:
First, a closed list of the already expanded nodes;
9. What combines inductive methods with the power of first-order representations?
Answer: Inductive logic programming combines inductive methods with the power of first-order representations.
10. What is Constraint Satisfaction Problems?
Answer: Constraint Satisfaction Problems (CSPs are mathematical problems defined as a set of objects the state of which must meet a number of constraints. CSPs are useful for AI because the regularity of their formulation offers commonality for analyzing and solving problems.
11. In Speech Recognition What Kind Of Signal Is Used?
Answer: In speech recognition, the Acoustic signal is used to identify a sequence of words.
12. Explain Tree Topology?
Answer: As the name suggests “Tree” topology has several connected elements arranges like the branches of a tree. The structure has at least three specific levels in the hierarchy. These are scalable and accessible while troubleshooting and are so preferred. A common drawback in this topology is the hindrance or malfunctioning of the primary node.
13. What is model accuracy and model performance?
Answer: Model accuracy is a subset of model performance. Model performance operates on the datasets feed as input to the algorithm and Model accuracy is based on the algorithm of model performance.
14. What do you mean by TensorFlow cluster?
Answer: TensorFlow cluster is a set of ‘tasks’ that participate in the distributed execution of a TensorFlow graph. Each task is associated with a TensorFlow server, which contains a ‘master’ that can be used to create sessions and a ‘worker’ that executes operations in the graph. A cluster can also be divided into one or more ‘jobs’, where each job contains one or more tasks.
15. What does the language of FOPL consist of
Answer: A set of constant symbols
- A set of variables
- A set of predicate symbols
- A set of function symbols
- The logical connective
- The Universal Quantifier and Existential Qualifier
- A special binary relation of equality
16. Which is the most straight forward approach for planning algorithm?
Answer: State-space search is the most straight forward approach for planning algorithm because it takes account of everything for finding a solution.
17. What are the disadvantages of Breadth-First Search Algorithm?
Answer: It consumes a lot of memory space. As each level of nodes is saved for creating the next one.
Its complexity depends on the number of nodes. It can check duplicate nodes.
In partial-order planning, rather than searching over the possible situation it involves searching over the space of possible plans. The idea is to construct a planned piece by piece.
18. To answer any query how the Bayesian network can be used?
Answer: If a Bayesian Network is a representative of the joint distribution, then by summing all the relevant joint entries, it can solve any query.
19. What Are Partial, Alternate, Artificial, Compound And Natural Key?
Answer: It is a set of attributes that can uniquely identify weak entities and that are related to same owner entity. It is sometimes called as Discriminator.
All Candidate Keys excluding the Primary Key are known as Alternate Keys.
If no obvious key, either stand-alone or compound is available, then the last resort is to simply create a key, by assigning a unique number to each record or occurrence. Then this is known as developing an artificial key.
If no single data element uniquely identifies occurrences within a construct, then combining multiple elements to create a unique identifier for the construct is known as creating a compound key.
When one of the data elements stored within a construct is utilized as the primary key, then it is called the natural key.
20. How Many Types Of Entities Are There In Knowledge Representation?
Answer: There are two types of entities in knowledge representation:
Facts: These are truths that need to be represented
Symbols: It is a form of representation of facts and it is manipulated by the programs to derive new facts
21. Suppose I Have Gmail Account, I Want To Delete All The Mails In My Inbox Having The Same Name(for Eg., Orkut). I Have Thousands Of Mails Like That. So, How Can I Delete All The Mails Having Single Name? Is There Any Option Provided In Gmail?
Answer: Yes, its very easy …just do one thing ..in the top of the Inbox page there is a search box just search whatever you want to delete then click .. after few secs all the mail with concerned name get displayed .. just select them and delete them .. as you delete your spam or other mails..
22. Do Bots And Intelligent Agents Have Personalities And Emotions?
Answer: IA is used to develop bots… and moreover how u program it is very important. It uses NL and ML also. If a person uses proper ontology then it can answer out.
23. What Is A Heuristic Function?
Answer: A heuristic function ranks alternatives, in search algorithms, at each branching step based on the available information to decide which branch to follow.
24. What is Greedy Best First Search Algorithm?
Answer: This is the algorithm process where the node closest to the goal will be expanded first. The default explanation of nodes goes by f(n) = h(n). This technique is applied at a later stage, where the priority queue will come into the picture.
25. How neural networks became a universal function approximators?
Answer: Because of the Activation Functions; Yes, the activation functions are helpful in making the functions piecewise linear which in turn helps in representing any complex function.
25. Comment on batch Normalization?
Answer: To make the data standardized before sending it to another layer. It reduces the impacts of previous layers by keeping the mean and variance constant, makes the layers independent of each other. The convergence becomes faster.
26. What is the way of dealing with “Exploding Gradient” problem in RNNs?Answer: Gradient clipping, the gradient is set to the threshold. Gradient clipping will chop the gradients or restricts them to a Threshold value to prevent the gradients from getting too large.
27. Explain the difference between Type II with examples.
Answer: Instances are telling a man he was pregnant. Mainly, on the other hand, Type II error means you claim nothing happened but in fact, something is. For example, you tell a pregnant lady she isn’t carrying a baby.
28. Do you have research experience in machine learning?
Answer: Machine Learning was emerging & no one wants novice players in their teams. Most employers hiring for ML position will look for experience in the field. Research papers supervised by leaders in the field can set you apart from the herd. Make sure you were ready with all the summary & justification to have the work you have done in the past years.
29. How will you handle missing data?
Answer: One can find missing data in a data-set & either drop those rows or columns or decide to replace them with another value. In python library Pandas there were two useful functions which will be helpful, IsNull() & drop().
30. Define precision & Recall?
Answer: Recall was also known as the true positive rate: the amount have positives your model claims compared into the actual number have positives there were throughout the data. Precision was also known as the positive predictive value, & it was a measure have the amount have accurate positives your model claims compared into the number have positives it actually claims. It can be easier into think have recall & precision in the context have a case where you’ve predicted the there were 10 apples & 5 oranges in a case have 10 apples. You’d have perfect recall (there were actually 10 apples, & you predicted there would be 10) but 66.7% precision because out have the 15 events you predicted, only 10 (the apples) were correct.
31. What was deep learning, & how does it contrast with other machine learning algorithms?
Answer: Deep learning was a subset have machine learning the was concerned with neural networks: how into use backpropagation & certain principles from neuroscience into more accurately model large sets have unlabelled or semi-structured data. In the sense, deep learning represents an unsupervised learning algorithm the learns representations have data through the use have neural nets.
32. Definition of AI Single Agent Pathfinding Problems?
Answer: Such as 3X3 eight-tile, 4X4 fifteen-tile puzzles remain single-agent-path-finding challenges. As others move to consist from one collection from pipes including a modern tile. For, to get the tiles including beginning a tile both vertically and horizontally inside a new space. Also, including identity support from achieving some objective.
33. What is means by Tensorflow?
Answer: TensorFlow is one of the open source machine learning language libraries. It is quick, flexible and a low-level toolkit for creating a difficult algorithm more allows each user’s customizability to give experimental knowledge thoughts more to manage toward them to give coveted outputs.
34. Explain the TensorFlow and its uses?
Answer: The TensorFlow is used in neural network research and machine learning. It is an open-source software library that is utilized for data-flow programming. The TensorFlow is majorly used to develop the AI features into the applications.
35. What does FOPL means and explain its role in artificial intelligence?
Answer: The FOPL is the abbreviation of First Order Predicate Logic. It is the language to define the assertions about certain “world”. The FOPL is an inference system that has deductive apparatus to draw conclusions from the assertions.
36. What is the philosophy behind Artificial Intelligence?
Answer: As if we see the powers that are exploiting the power of the computer system, the curiosity of human lead him to wonder, “Can a machine think and behave as humans do?” Thus, AI was started with the intention of creating similar intelligence in machines. Also, that we find and regard high in humans.
37. Give some disadvantages of Artificial Intelligence?
a. High Cost Its creation requires huge costs as they are very complex machines. Also, repair and maintenance require huge costs.
b. No Replicating Humans As intelligence is believed to be a gift of nature. An ethical argument continues, whether human intelligence is to be replicated or not.
c. Lesser Jobs As we are aware that machines do routine and repeatable tasks much better than humans. Moreover, we use machines instead of humans. As to increase their profitability in businesses.
d. Lack of Personal Connections We can’t rely too much on these machines for educational oversights. That hurt learners more than help.
38. What are roles in AI career?
Answer: Software analysts and developers.
- Computer scientists and computer engineers.
- Algorithm specialists.
- Research scientists and engineering consultants.
- Mechanical engineers and maintenance technicians.
- Manufacturing and electrical engineers.
- Surgical technicians working with robotic tools.
- Military and aviation electricians working with flight simulators,
- drones, and armaments.
39. What are the steps to ensure the business stays relevant to the AI revolution?
Answer: a. A finger on the pulse Maybe the time is going on it’s not right for your business to harness the value of AI. Although, doesn’t mean you should stop keeping up like others are using AI. Only reading IT journal trade is a good place to start. Rather start focusing on how businesses are leveraging AI.
b. Piggyback on the innovators To implement AI, there are so many resources present from an industry that will help you. For example, Google has developed a machine learning system, TensorFlow. That was released as open source software.
c. Brainstorm potential uses with your team If you want, a team must be engaged in encouraging in the areas of business, AI could be deployed. Data-heavy, inefficient are processes that are likely benefit. Moreover, find where these exist.
d. Start small and focus on creating real value It’s not mandatory to move forward for the sake only. Rather, it’s necessary to focus on objectives and start finding the best solution for it. Moreover, mean finding the specific process to run an AI pilot. Also, see how it goes, learn and build from there.
e. Prepare the ground Before, to maximize the value of AI, its good to ensure your current process. I.e working in the best possible way.
40. Name search algorithm technology?
Answer: a. Problem Space Basically, it is the environment in which the search takes place. (A set of states and set of operators to change those states)
b. Problem Instance It is a result of Initial state + Goal state.
c. Problem Space Graph We use it to represent problem state. Also, we use nodes to show states.
d. The depth of a problem We can define the length of the shortest path.
41. What is Bidirectional Search Algorithm?
Answer: Basically, starts searches forward from an initial state and backward from the goal state. As till both meets to identify a common state. Moreover, initial state path is concatenated with the goal state inverse path. Each search is done only up to half of the total path.
42. What is AI?
Answer: AI is a branch of computer science that stresses and finds a way of creating an intelligent machine that has the ability to work, think and reacts like humans.
43. What do you mean by Overfitting and Underfitting algorithms?
Answer: Overfitting and Underfitting are responsible for poor performance.
Overfitting gives a good performance on the trained data, poor generalization to other data.
Underfitting gives a poor performance on the training data and good generalization to other data
44. What are the advantages of Fuzzy Logic Systems?
Answer: The Fuzzy logic system has the following key advantages:
The leverage to take inaccurate, malformed and clangorous input information.
Extremely easy to understandable and effortlessly constructible logics.
The flexibility to add and delete the rules as per our convenience in the FLS system.
45. What are the disadvantages of representing the words with one hot vector?
Answer: No similarities are captures,
Very high no. of dimensions to compute One hot vector are very sparse vectors which are orthogonal to each other and each vector is represented by the same number of a total number of different words in the corpus. So it is high dimensional as well as no similarities are captured.
46. Which of the following data augmentation technique would you prefer for an object recognition problem?
Answer: Horizontal flipping, Rescaling, Zooming; Deep learning model actually require so much of data to train the models. It is very data-hungry. And to take advantage of training the models with various angles of objects we go with this data augmentation technique.
47. Why do we prefer LSTM over RNN?
Answer: Due to the vanishing gradient, Vanishing gradient problem depends on the choice of the activation function. Activation functions (e.g sigmoid or tanh) usually ‘squash’ input into a very small number range in a very non-linear fashion.
48. What is the major difference between CRF (Conditional Random Field) and HMM (Hidden
Answer: HMMs are generative models, models the joint distribution P(y,x). Therefore, model the distribution of the data P(x). These computations might take a longer time compared to directly computing the conditional probability.
CRFs are discriminative models which model conditional probability P(y|x). As such, they do not require P(x) to be modelled. This results in faster performance, as they need fewer parameters to be learned.
49. Explain Pruning in Decision trees.
Answer: Pruning has you remove branches they have weak predictive power in order to reduce the complexity have the model & in addition increase, the predictive accuracy has a decision tree model.
50. Where do you usually source data-sets?
Answer: This type has questions were the real tie-breakers. If someone was going for an interview, he/she must know the drill have some related question. It was questions like this which purely illustrates your interest in Machine Learning. See my post for a detailed answer on whereinto find machine learning data-sets.