Наш ответ Siri или построение системыдиалогового AI для нового продукта i-Free Веселов В.В. к.т.н
О себе                  Образование – Военная Инженерно-                  Космическая Академия им. А.Ф.                  М...
The Turing Test…  I believe that in about fifty years time it will be possible to  programme computers with a storage capa...
Web Chatter Bot                        User enters text in normal                    1   conversational form5             ...
Benefits• User Friendly Interface• Shortcuts to Vital Information• Self Service for Employees and Customers  (24/7)• User ...
Евгений Густман• http://www.princetonai.com/bot• Дата создания - июль 2001• Финалист The Loebner Prize – 2001, 2002,  2003...
Features•   Spell checker, typos corrector•   Advance pattern matching language•   Context sensitive pattern matching•   R...
Architecture<Engine>           <Input>                     <Variables>           <Actions>                       <Language...
Typos Correctorabbout=aboutabotu=aboutabouta=about aaboutit=about itabscence=absenceaccomodate=accomodateaccross=acrossach...
Pattern matching expressions  1. Token definition  <MultiToken name="qWhatBe">(tell (me|) (about|)|I am interested     in|...
<Theme name="Mother"> <QAUnit name="HaveMother" type="STATEMENT">  <Pattern>* #(qDoYouHave) * #(mother) *</Pattern>  <Patt...
Processing Math Expressions <QAUnit name="Calc" type="STATEMENT">   <Pattern>* (calculate|evaluate | tell me|what is|expre...
Dynamic Tokens Problem: How to use a structured data in a chatbot? Example: The information about countries stored in  the...
Dynamic Tokens                      Token 3            Token 2                                                        Data...
Dynamic Tokens 1. Load tokens from the database. <MultiToken name="dynCountries" type="DYNAMIC">     SELECT CountryPattern...
Logs  USER: what is a location of france  RESPONSE: Buy a map and hang it over your desk! France -  country in W Europe, o...
Benefits for Social Networks• Chatbots can access user’s information and  provide comments on the user profile or on  anot...
Weather Service Example<Theme name="Weather" type="CONTEXT“><QAUnit name="AboutWeatherAnyDayAtCity" type="STATEMENT">1. Va...
Вопросы/Ответы
Спасибо!
Upcoming SlideShare
Loading in …5
×

Eugene goostman the bot

1,401 views

Published on

Published in: Technology, Education
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
1,401
On SlideShare
0
From Embeds
0
Number of Embeds
488
Actions
Shares
0
Downloads
8
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Eugene goostman the bot

  1. 1. Наш ответ Siri или построение системыдиалогового AI для нового продукта i-Free Веселов В.В. к.т.н
  2. 2. О себе Образование – Военная Инженерно- Космическая Академия им. А.Ф. Можайского Служба – 3-й Центр Испытания и Применения Космических Средств, Байконур
  3. 3. The Turing Test… I believe that in about fifty years time it will be possible to programme computers with a storage capacity of about 109 to make them play the imitation game so well that an average interrogator will not have more than 70 per cent chance of making the right identification after five minutes of questioning. Alan Turing, 1950A chatter bot is a computer program that uses artificial intelligence to simulate intelligent conversations with users
  4. 4. Web Chatter Bot User enters text in normal 1 conversational form5 User selects question from 3 2 list 1 Chatter Bot provides 3 conversational response 2 Response drives additional 4 content to appear 4 ChatBot emotion matches 5 the question or response
  5. 5. Benefits• User Friendly Interface• Shortcuts to Vital Information• Self Service for Employees and Customers (24/7)• User Feedback• Targeting for Web Application Improvement• Access via Net or Phone+• Access to SmartPhone Services
  6. 6. Евгений Густман• http://www.princetonai.com/bot• Дата создания - июль 2001• Финалист The Loebner Prize – 2001, 2002, 2003, 2005, 2008• Команда: Е. Демченко, С. Уласень, С. Семушкина, М.Гершкович, Лаурен Алкир( графика)
  7. 7. Features• Spell checker, typos corrector• Advance pattern matching language• Context sensitive pattern matching• Random or defined responses• Logical and math expression interpreter• Constraint dialogs• Dynamic tokens (loaded from database)• Integration with external database(s)
  8. 8. Architecture<Engine> <Input> <Variables> <Actions> <Language Processor> <Input> <MultiTokens> <RegularMatchers> <TreeMatchers> <Themes> <QAUnits> <Patterns> <Rules> <ContextPatterns> <Rules> <Rules> <Actions> <Output> <Text> <Random> <Output> <Variables> <Request>
  9. 9. Typos Correctorabbout=aboutabotu=aboutabouta=about aaboutit=about itabscence=absenceaccomodate=accomodateaccross=acrossacheive=achieveacheived=achievedacheiving=achievingacn=can…
  10. 10. Pattern matching expressions 1. Token definition <MultiToken name="qWhatBe">(tell (me|) (about|)|I am interested in|what (is|are|were|was|*ould be|)|know what)</MultiToken> <MultiToken name="qWhatBe0">(#(qWhatBe)|)</MultiToken> <MultiToken name="qWhoBe">(tell (me|) (about|)|I am interested in|who (is|are|was|were|*ould be|)|know who)</MultiToken> <MultiToken name="qWhoBe0">(#(qWhoBe)|)</MultiToken> 2. Pattern Expressions <Pattern>* (#(qWhatAbout)|) (#(pYour)|#(pU)) name *</Pattern> <Pattern>* tell me (#(pYour)|#(pU)) name *</Pattern> <Pattern>* how * I call #(pU) *</Pattern> <Pattern>* my name is * what * yours *</Pattern> <Pattern>* do #(pU) have (a|) name *</Pattern>
  11. 11. <Theme name="Mother"> <QAUnit name="HaveMother" type="STATEMENT"> <Pattern>* #(qDoYouHave) * #(mother) *</Pattern> <Pattern>* #(pYour) #(mother) * (well|feeling fine|fine) *</Pattern> <Pattern>mother</Pattern> <Random> <Text>Yes, of course I have mother! And I love her very much.</Text> <Text>My mother works on TV.</Text> </Random> </QAUnit><QAUnit name="MotherProfession" type="STATEMENT"> <Pattern>* #(qWhoBe0) * #(pYour) #(mother) *</Pattern> <Pattern>* #(pYour) #(mother) #(qWhoBe0) *</Pattern> <Pattern>* (Does|if|whether|where) * #(pYour) #(mother) work* *</Pattern> <Pattern>* (Tell me (more|*)|) about #(pYour) #(mother) *</Pattern> <ContextPattern>* Who is she *</ContextPattern> <ContextPattern>* who she is *</ContextPattern> <ContextPattern>* (Does|if|whether|where) she work* *</ContextPattern> <ContextPattern>* what does she do *</ContextPattern> <ContextPattern>* #(qWhoBe0) #(pYour) #(mother) #(profession) *</ContextPattern><Random> <Text>My mother works on the Odessa TV and runs a popular program for teenagers "Speak Russian right!" Every Odessian teenager heard her famous "For those putzs who schmooze Russian in a goddam lame way: drop by and listen to mine!"</Text> <Text>If you lived in Odessa, you couldnt help but know my mom - she runs a popular educational TV program for teenagers about Russian language.</Text> </Random> </QAUnit>
  12. 12. Processing Math Expressions <QAUnit name="Calc" type="STATEMENT"> <Pattern>* (calculate|evaluate | tell me|what is|expression|) * #(MiddleNumber) (+|- |#(symStar)|#(symSlash)|plus|add|and|minus|subtract*|times|multipl* by|divid* by) #(MiddleNumber) *</Pattern> <Action> <Variable name="Arg1" type="String">=gettoken[TRACE_VARIABLE,1]</Variable> <Variable name="Arg1Num" type="String">=text.words2int[#(Arg1)]</Variable> <Variable name="SignStr" type="String">=gettoken[TRACE_VARIABLE,2]</Variable> <Variable name="Sign" type="String">=text.words2sign[#(SignStr)]</Variable> <Variable name="Arg2" type="String">=gettoken[TRACE_VARIABLE,3]</Variable> <Variable name="Arg2Num" type="String">=text.words2int[#(Arg2)]</Variable> </Action> <Action> <Text> <Expression>#(Arg1Num) #(Sign) #(Arg2Num)</Expression> <Variable name="Expr" type="String"/> </Text> <Variable name="Res" type="String">=text.evaluate[#(Expr)]</Variable> <Random> <Text>Am I a calculator for you? Well, I am... #(Expr)=#(Res).</Text> <Text>Well, just for you: #(Expr)=#(Res)... But hush - its a secret information!!!</Text> <Text>Now Im sure that you are one of those crappy robots from the Great Robots Cabal! And I know your password: #(Expr)=#(Res)! Now divide by zero and die!!!!</Text> <Text>#(Expr)=#(Res). Hope, in the nearest future, youll try to estimate a square root of -1, and die of Overwhelming Imaginarity, crappy android!</Text> </Random> </Action> </QAUnit>
  13. 13. Dynamic Tokens Problem: How to use a structured data in a chatbot? Example: The information about countries stored in the database. Bot needs to answer the questions: “What is the capital of <country name>?” “What is the population of <country name>?” etc. Traditional approach will require long routine work to create patterns and answers for all countries. How to answer: “Which country has more population: <country 1> or <country 2>?”
  14. 14. Dynamic Tokens Token 3 Token 2 Database Token 4 Country Capital Population Token 1 France Paris 50,000,000 Germany Berlin 60,000,000 Tree Matcher ..Sentence: “<Token 1> <Token 2> <Token 3>”Pattern: <Token 1> <Token 2> <Token 3>Response: <text> <Token 3> <information>
  15. 15. Dynamic Tokens 1. Load tokens from the database. <MultiToken name="dynCountries" type="DYNAMIC"> SELECT CountryPattern FROM Countries </MultiToken> 2. Define the pattern. <Pattern>* (#(qWhatBe) | #(qWhatAbout) |) * (capital|capitol) * (of|in|) #(dynCountries) *</Pattern> 3.Extract the country name. <Variable name="country" type="String">=GetTokenByName[TRACE_VARIABLE,{dynCountries}]</Variable> 4. Retrieve the capital from the database. <DataLookUp> <Table> <TableName>Countries</TableName> <Record><Field>Capital</Field><Variable name="capital“ type="String"/></Record> </Table> <Where>Country = #(country)</Where> </DataLookUp> 5. Generate response <Text>Well, if you want it, the capital of #(country) is #(capital).</Text>
  16. 16. Logs USER: what is a location of france RESPONSE: Buy a map and hang it over your desk! France - country in W Europe, on the Atlantic and the Mediterranean Sea. USER: what is its population RESPONSE: Well, according to the latest secret data approximately 54.3 mln live in France. USER: is it greater than germany RESPONSE: Id say that Germany is smaller than France. USER: what is a size of germany RESPONSE: Well, if you want to conquier Germany, youll have lots of work - its square is about 356.8 thsd sq. km.
  17. 17. Benefits for Social Networks• Chatbots can access user’s information and provide comments on the user profile or on another users.• Chatbots can use the information from news and events in conversation.• Chatbots can access external data sources and use the information in conversation
  18. 18. Weather Service Example<Theme name="Weather" type="CONTEXT“><QAUnit name="AboutWeatherAnyDayAtCity" type="STATEMENT">1. Variables initialization <Variable name="location" type="String">Saint-Petersburg</Variable> <Variable name="day" type="String">today</Variable>2. Patterns <Pattern>* #(Day) * #(Weather) * #(City) *</Pattern> <Pattern>* (what is|tell|) * weather *</Pattern> <Pattern>* is it #(Weather ) *</Pattern> <ContextPattern>* #(Weather) *</ContextPattern> <ContextPattern>* #(Day) *</ContextPattern> <ContextPattern>* #(HashRussiaCities) *</ContextPattern>3. Actions <Action comment="NA">4. Extract location and day from the sentence <Variable name="locationTMP" type="String">=GetTokenByName[TRACE_VARIABLE,{City}]</Variable> <Variable name="dayTMP" type="String">=GetTokenByName[TRACE_VARIABLE,{Day}]</Variable>5. Check if location and day where identified <Variable name="locationTMPlength" type="Integer">=string.length(locationTMP)</Variable> <Choice><Variable name="locationTMPlength" type="Integer" /> <Variant value="0" /> <Variant value="OTHER“><Variable name="location" type="String">=#(locationTMP)</Variable> </Variant></Choice> <Variable name="dayTMPlength" type="Integer">=string.length(dayTMP)</Variable>- <Choice><Variable name="dayTMPlength" type="Integer" /><Variant value="0" /> <Variant value="OTHER“><Variable name="day" type="String">=#(dayTMP)</Variable></Variant></Choice>6. Generate URL and request temperature<Text><Expression>http://assist.unicorn- dev.mmi.ru/weather.xml?location=#(location)&days=#(dayNumber)</Expression> <Variable name="URL" type="String" /> </Text> <ClassAction ClassName="HttpRequest“><Variable name="response" type="String" />- <Argument><Variable name="URL" type="String">#(URL)</Variable> </Argument></ClassAction>7.Generate response <Text>#(day) temperature in #(location) is #(response) C</Text> </Action> </QAUnit> </Theme>
  19. 19. Вопросы/Ответы
  20. 20. Спасибо!

×