Full Transcript

DAB106 Introduction to Artificial intelligence Natural Language Processing vs. Natural Language Understanding https://youtu.be/UmEscKl1f6E What is Natural Language Processing? Defining NLP The branch of AI focused on the interaction between computers and humans through...

DAB106 Introduction to Artificial intelligence Natural Language Processing vs. Natural Language Understanding https://youtu.be/UmEscKl1f6E What is Natural Language Processing? Defining NLP The branch of AI focused on the interaction between computers and humans through natural language. Facilitates understanding and generating human language by machines. Core Functions of NLP Understanding: Decomposing language into comprehensible units. Interpretation: Inferring meaning and context. Generation: Crafting responses in natural language. Key NLP Tasks Language Translation: Translating across languages while maintaining semantic integrity. Text Summarization: Boiling down extensive text to key points. Speech Recognition: Converting spoken words to text. How NLP works? Scenario: User Question Input example: "What's the weather like today in New York City?" NLP Process Steps Tokenization: Breaks down the sentence into individual words or tokens. Part-of-Speech Tagging: Assigns a part of speech to each word, clarifying sentence structure. Named Entity Recognition (NER): Identifies and classifies named entities within the text, like "New York City." Intent Recognition: Determines the user's intent from the structure and entities recognized. Response Generation: Crafts a response aligned with the recognized intent. NLP in Action From analysis to reply, NLP guides the interaction. What is NLU? Defining NLU A subset of NLP focusing on comprehending human language. Enables machines to grasp the meaning and context of language inputs. Core Functions of NLU Comprehension: Analyzing language for meaning. Contextual Interpretation: Understanding the context in which words are used. Sentiment Analysis: Determining the emotional tone behind words. Key NLU Tasks Entity Recognition: Identifying and classifying key elements in text. Intent Detection: Understanding the purpose behind a user's input. Contextual Relevance: Assessing the significance of language in context. Imagine a customer service chatbot for a Example travel agency. A user interacts with the chatbot by typing: "I want to book a flight to Scenario Paris next Friday, but I'm not sure about the return date." What is NLU? Applications in Technology Interactive Voice Response (IVR) Systems: Understanding and routing customer queries in call centers. AI-Powered Analytics Tools: Interpreting user feedback for insights. Real-world Example: IVR System Interaction Scenario: Customer calls for support - "I'm having trouble with my bill." IVR System Workflow: Analyzes the statement. Determines the issue is billing-related. Routes the call to the billing department. How Natural Language Understanding (NLU) Works Scenario: User Inquiry Input example: "Can you suggest a good Italian restaurant nearby?" NLU Process Steps Contextual Analysis: Understanding the sentence's overall meaning. Entity Recognition: Identifying 'Italian restaurant' as the key entity. Intent Detection: Recognizing the user's intent to find a restaurant. Sentiment Analysis: Assessing the user's preference for 'good' as indicating quality. Contextual Relevance: Understanding "nearby" refers to the user’s current location for accurate suggestions. Relevant Response Generation: Suggesting options based on the analysis. NLU in Action The system interprets the request and provides a meaningful response. Exploring Natural Language Generation (NLG) Defining NLG A branch of NLP focused on generating human-like language from data. Transforms structured information into readable text or speech. Core Functions of NLG Data Analysis: Interpreting and organizing input data. Content Planning: Structuring the narrative based on the data. Text Realization: Converting data into coherent language. Key NLG Tasks Report Generation: Producing written summaries from data sets. Automated Journalism: Writing news articles from factual inputs. Conversational Agents: Generating dialogues for chatbots or virtual assistants. Exploring Natural Language Generation (NLG) Applications in Technology Business Intelligence Tools: Generating insights from data. News and Content Writing: Automating news article creation. Interactive Voice Assistants: Crafting responses in conversations. Real-world Example: Automated News Reporting Scenario: Generating a sports news article. NLG Process: Analyzes match data (scores, player stats). Plans article structure (lead, body, conclusion). Produces a readable article about the game. How Natural Language Generation (NLG) Works Scenario: Data Reporting Example: Transforming financial data into a quarterly earnings report. NLG Process Steps Data Input & Analysis: Receives and interprets raw financial data (e.g., sales, profits). Content Structuring: Organizes data points into a logical sequence for reporting. Narrative Creation: Constructs a narrative around the data, establishing context. Language Synthesis: Transforms structured content into readable text. Text Refinement: Polishes the language for clarity and coherence. NLG in Action: Converting complex data into an understandable and engaging report. Integration of NLP, NLU, and NLG Unified Process Overview Collaboration of NLP, NLU, and NLG in AI communication systems. Scenario: Customer Service Chatbot Example: Handling a customer's query about a product return. Detailed Process Breakdown NLP: Processing User Input Input: "Can I return a product I purchased last week?" Tokenization: Divides the sentence into individual words. Part-of-speech tagging: Assigns grammatical roles to each word. NLU: Deep Analysis & Understanding Entity Recognition: Identifies 'product' and 'last week' as key elements. Intent Detection: Infers the user's intent to inquire about return policy. Contextual Interpretation: Considers the timing of the purchase. NLG: Articulating the Response Content Planning: Determines the most relevant information to include. Sentence Structuring: Composes sentences explaining the return policy. Language Refinement: Ensures clarity and conciseness in the response. Interactive Workflow From processing the query with NLP, understanding context with NLU, to creating a coherent response with NLG. Aspect NLP (Natural Language Processing) NLU (Natural Language Understanding) NLG (Natural Language Generation) Subset of AI involving programming Teaches machines to interpret and Focuses on generating human-like Definition computers to process massive understand language inputted by language from data. volumes of language data. humans. Understand the subtleties and variations Transform structured information into Objective Convert text to structured data. of language, such as sentiment, readable text or speech. semantics, context, and intent. Parsing, speech recognition, part-of- Recognizing attributes of language; Data analysis, content planning, text Key Tasks speech tagging, information understanding questions regardless of realization. extraction. phrasing variations. Aims to teach computers the meaning Breaks down language into smaller Generates reports, automated behind text or spoken speech. Enables Functionality elements to understand journalism, conversational dialogue in understanding of subtle language relationships and collaboration. chatbots or virtual assistants. nuances. Used in text analytics, language Powers applications that need to Utilized in business intelligence, Applications translation, creating structured data recognize various ways humans say the automated content creation, and from text. same thing. responsive voice interactions. Subset of AI involving programming Teaches machines to interpret and Focuses on generating human-like Definition computers to process massive understand language inputted by language from data. volumes of language data. humans. Understand the subtleties and variations Transform structured information into Objective Convert text to structured data. of language, such as sentiment, readable text or speech. semantics, context, and intent. source:https://nlp.stanford.edu/~wcmac/papers/20140716-UNLU.pdf source:https://nlp.stanford.edu/~wcmac/papers/20140716-UNLU.pdf False Rumor of Explosion at White House Causes Stocks to Briefly Plunge; AP Confirms Its Twitter Feed Was Hacked https://www.cnbc.com/id/100646197 source:https://nlp.stanford.edu/~wcmac/papers/20140716-UNLU.pdf 5 Most Advanced Humanoid Robots https://youtu.be/9DaTZQxg21U What are Agent and Environment? What is an agent? An AI system is composed of an agent and its environment. The agents act in their environment. The environment may contain other agents. An agent is any entity that can perceive its environment through sensors and acts on its environment through effectors. An agent is anything that can be viewed as perceiving its environment through sensors and acting upon that environment through actuators Agents in AI An AI system is composed of an agent and its environment The agent act in their environment , the environment may contain other agents An agent is anything that can be viewed as : Perceiving its environment through sensors and Acting upon that environment through actuators Agents use their actuators to run through a cycle of perception, thought, and action. Types of Agent Human Sensory organs such as eyes, ears, nose, tongue and skin parallel to the sensors, and other organs such as hands, legs, mouth, for actuators. Robotics Robotic agents have cameras and infrared range finders that act as sensors, and various servos and motors perform as actuators. Software This Agent has file contents, keystrokes, and received network packages that function as sensory input, then act on those inputs, displaying the output on a screen. An agent runs in the cycle of perceiving ,thinking and acting Human agent: – Sensors: eyes, ears, and other organs. Agents and – Actuators: hands, legs, mouth, and other body parts. environments Robotic agent: – Sensors: Cameras and infrared range finders. – Actuators: Various motors. Agents everywhere – Thermostat – Cell phone – Vacuum cleaner – Robot – Alexa Echo – Self-driving car – Human – etc. This Photo by Unknown Author is licensed under CC BY Agents in AI Intelligent agents in AI are autonomous entities that act upon an environment using sensors and actuators to achieve their goals. In addition, intelligent agents may learn from the environment to achieve those goals. Driverless cars and the Siri virtual assistant are examples of intelligent agents in AI. These are the main four rules all AI agents must adhere to: Rule 1: An AI agent must be able to perceive the environment. Rule 2: The environmental observations must be used to make decisions. Rule 3: The decisions should result in action. Rule 4: The action taken by the AI agent must be a rational. Rational actions are actions that maximize performance and yield the best positive outcome. Environment in AI An Environment in AI act like our environment. An environment is not part of an agent. It represents a situation where agent is present. An environment is everything in the world which surrounds the agent , but it is not part of an agent itself. Environment in AI Fully Observable Environment: A fully observable environment is one in which the AI system has complete information about its surroundings. This means that the AI can sense or see everything happening, and use this to make informed decisions. Example: A chess-playing AI operates in a fully observable environment because it has a complete view of the chessboard at all times and can see every move. Partially Observable Environment: A partially observable environment is one where the AI system does not have full information about its surroundings. It can only sense or see part of the environment and must make decisions based on limited information. Example: A self-driving car operates in a partially observable environment because it can only sense what is within its sensor range, such as the road directly ahead, while obstacles outside its view may still affect its decisions. Environment in AI Deterministic Environment: A deterministic environment is one where the outcome of an action is always the same, given the same initial conditions. The future state is fully determined by the current state and the actions taken. Example: A chess-playing AI plays in a deterministic environment because the outcomes of each move can be predicted with certainty based on the rules of the game. Stochastic Environment: A stochastic environment is one where the outcome of an action is uncertain and determined by probability. The future state is not fully determined by the current state, as there are random or unpredictable factors. Example: A self-driving car operates in a stochastic environment because it faces unpredictable elements such as other drivers, pedestrians, and weather conditions. Environment in AI Episodic Environment: An episodic environment is one where each decision is made independently, without considering past experiences. The AI treats each situation as a separate event. Examples: A facial recognition system that identifies faces in individual photos, where each image is analyzed without considering previously processed faces. Sequential Environment: A sequential environment is one where the AI's decisions depend on past experiences. Each action is influenced by the history of prior interactions. Examples: A recommendation system that suggests products based on previous purchases or viewing history. Environment in AI Single Agent Environment: A single agent environment involves only one AI agent that operates independently and makes decisions based on its own observations and goals. Examples: A spam filter AI analyzing emails. Multi-Agent Environment: A multi-agent environment involves multiple AI agents that interact and make decisions within the same space. Each agent has its own goals and can communicate or respond to the actions of other agents. Examples: Autonomous drones coordinating a search-and-rescue mission. Environment in AI Complete Environment: A complete environment is where the AI has full access to all relevant information required to make decisions. Examples: A factory robot with sensors detecting all important variables in its work area. Incomplete Environment: An incomplete environment is one where the AI lacks some critical information and has to make decisions with partial knowledge. Examples: A robot vacuum cleaner that cannot detect dirt hidden under furniture. A self-driving car with limited sensor input due to poor weather conditions or obstructions. Environment in AI Static Environment: A static environment is one where the environment's state does not change unless the AI acts. The conditions remain fixed, and the AI's decisions are based on these stable factors. Examples: A puzzle-solving AI working on a crossword puzzle. Dynamic Environment: A dynamic environment changes with or without the AI's actions. The AI must adapt to the evolving conditions in the environment. Examples: A self-driving car navigating changing traffic and road conditions. Environment in AI Known Environment: A known environment is one in which the AI has prior experience or knowledge. It has previously encountered similar conditions and can use that knowledge to make decisions. Example: A self-driving car that navigates a familiar route it has driven before would be operating in a known environment because it has learned the road conditions and patterns in the past. Unknown Environment: An unknown environment is one in which the AI has no prior knowledge or experience. The AI needs to explore, gather information, and learn about the environment in order to make decisions. Example: A self-driving car traveling on a completely new and unfamiliar road would be considered to be in an unknown environment, as it needs to adapt and learn about the new surroundings while driving.

Use Quizgecko on...
Browser
Browser