14:54:11 RRSAgent has joined #web-hybrid-ai 14:54:15 logging to https://www.w3.org/2024/09/25-web-hybrid-ai-irc 14:54:15 RRSAgent, do not leave 14:54:16 RRSAgent, make logs public 14:54:17 Meeting: Web API for Hybrid AI 14:54:17 Chair: Chunhui Mo, Martin Alvarez-Espinar 14:54:17 Agenda: https://github.com/w3c/tpac2024-breakouts/issues/44 14:54:17 Zakim has joined #web-hybrid-ai 14:54:18 Zakim, clear agenda 14:54:18 agenda cleared 14:54:18 Zakim, agenda+ Pick a scribe 14:54:19 agendum 1 added 14:54:19 Zakim, agenda+ Reminders: code of conduct, health policies, recorded session policy 14:54:20 agendum 2 added 14:54:20 Zakim, agenda+ Goal of this session 14:54:20 agendum 3 added 14:54:20 Zakim, agenda+ Discussion 14:54:22 agendum 4 added 14:54:22 Zakim, agenda+ Next steps / where discussion continues 14:54:22 agendum 5 added 14:54:22 tpac-breakout-bot has left #web-hybrid-ai 15:32:58 Lei_Zhao8 has joined #web-hybrid-ai 15:34:33 Lei_Zhao has joined #web-hybrid-ai 16:36:55 martin has joined #web-hybrid-ai 16:37:55 reillyg has joined #web-hybrid-ai 16:49:40 martin has joined #web-hybrid-ai 16:50:43 martin has joined #web-hybrid-ai 17:00:04 Slides for the breakout session: https://kevinmoch.github.io/web-hybrid-ai/Templates/Overview.html 17:00:12 present+ 17:00:22 xfq has joined #web-hybrid-ai 17:02:13 present+ 17:02:31 scribe: xfq 17:02:33 QingAn has joined #web-hybrid-ai 17:02:42 martin: my name is Martin 17:02:54 kenji_baheux has joined #web-hybrid-ai 17:02:55 riju3 has joined #web-hybrid-ai 17:03:11 McCool has joined #web-hybrid-ai 17:03:14 dezell has joined #web-hybrid-ai 17:03:15 ... my colleague from Huawei, Chunhui Mo, will present this breakout session for this new API 17:03:16 xiaoqian has joined #web-hybrid-ai 17:03:25 present+ 17:03:30 sisidovski has joined #web-hybrid-ai 17:03:35 asully has joined #web-hybrid-ai 17:03:35 present+ 17:03:35 ora has joined #web-hybrid-ai 17:03:37 present+ 17:03:40 andrewnolan has joined #web-hybrid-ai 17:03:53 present+ 17:03:57 can someone repost the link? 17:03:58 Sarah has joined #web-hybrid-ai 17:04:08 ... I already shared the slides with you in the Zoom chat 17:04:14 https://kevinmoch.github.io/web-hybrid-ai/Templates/Overview.html 17:04:21 JRJurman has joined #web-hybrid-ai 17:04:32 appreciated! 17:04:46 chunhui: I'm Chunhui Mo 17:05:04 ... the main topic is the new web API proposal to support hybrid AI development 17:05:05 lambda has joined #web-hybrid-ai 17:05:23 ... enable web developer to directly access on-device and cloud-based models 17:05:40 ... and safely sharing user data across multiple apps when using these models 17:06:02 ... an example is @@ 17:06:13 ... since the AI topic covers a broad range of areas 17:06:27 ... I would like to clarify what is not in the scope 17:06:30 Repository with the proposal: https://github.com/kevinmoch/web-hybrid-ai 17:06:32 ora has joined #web-hybrid-ai 17:07:02 ... 1. Designing a uniform JavaScript API for accessing browser-provided language models, which is currently being explored by Chrome's AI team 17:07:13 ... known as the Prompt API 17:07:35 ... 2. Issues faced by hybrid AI, already covered by other breakout sessions 17:07:42 present+ 17:07:45 ... let's dive into Connection API 17:08:18 ... the prompt API @@ 17:08:26 ... both on-device and cloud-based 17:08:50 ... now let's talk about the switch model 17:09:03 ... switch between different apps 17:09:06 s/the prompt API @@/This is an extension of the Prompt API 17:09:15 ... similar to connect 17:09:25 ... this method is also an extension of the prompt API 17:09:37 ktoumura has joined #web-hybrid-ai 17:10:04 edward has joined #web-hybrid-ai 17:10:06 chunhui: now let's look at the sample code 17:10:22 [Chunhui shows the sample code] 17:11:09 ... I will give you a brief review of the methods 17:11:16 rrsagent, make log public 17:11:19 rrsagent, make minutes 17:11:20 I have made the request to generate https://www.w3.org/2024/09/25-web-hybrid-ai-minutes.html xfq 17:11:33 s/... I will give you/chunhui: I will give you 17:12:02 chunhui: now I'll cover the Storage API 17:12:54 [Chunhui shows Storage API Sample Usage] 17:13:47 chunhui: 'entry' is any kind of text including the user's private data 17:14:22 ... we store the info under the user's profile, in the travel category 17:14:35 ... if we have a web app connecting to the on-device model 17:15:14 [Chunhui shows Storage API Implementation References] 17:16:13 xueyuan has joined #web-hybrid-ai 17:16:57 Chunhui: let's see how we can combine the Connection and the Storage API 17:17:14 ... imagine we have planned a travel for upcoming holidays 17:17:22 ... first we open a flight booking app 17:17:33 ... and search for our destination 17:17:40 ... this app uses a cloud-based AI model 17:18:11 ... the recommend the best flight based on our needs 17:18:24 ... next maybe open a hotel booking app to find a place to stay 17:18:31 ... as you can see in this diagram 17:18:44 ... the architecture for the flight and hotel apps 17:18:53 ... can be broken down into the following steps 17:19:02 tomayac has joined #web-hybrid-ai 17:19:19 ... assistants gather the user information/preference 17:19:29 ... and send a request to the cloud-based model 17:19:35 ... and retrieve the flight options 17:19:51 ... once the flight information is returned 17:20:07 ... the system uses the Storage API to convert the date 17:20:24 ... stored into the database 17:20:36 ... @@ 17:20:53 ... finally @@ will be sent to the cloud-based model 17:21:07 [Chunhui shows a demo] 17:21:47 chunhui: Considerations for Connection Strategy 17:22:01 ... when we're talking about building apps for the hybrid AI 17:22:22 ... there are several crucial elements that need to be considered 17:22:30 ... 1. the connection time 17:22:46 ... we need to think about how the system connect to different AI models, for instance 17:23:01 ... if one model takes too long to respond 17:23:07 ... we can skip it 17:23:16 ... Custom Connection Strategy 17:23:28 ... give developer flexibility 17:23:48 ... we should offer more dynamic and efficient solution 17:23:53 ... Model Status Information 17:24:04 ... knowing the status of each model is key 17:24:12 ... is a model available? 17:24:24 ... Load Balancing Across Models 17:24:39 ... helps us automatically distribute requests 17:24:46 ... version control 17:24:57 ... Considerations for Storage Strategy 17:25:06 jfernandez has joined #web-hybrid-ai 17:25:19 ... @@ 17:25:39 ... now let's look at a step further by looking at Considerations for Native OS APIs 17:26:09 ... need to ensure that the AI model works consistently no matter which device is being used 17:26:25 ... by leveraging the OS 17:26:42 ... reduce overhead that comes with browser-based storage 17:27:09 ... allowing the system to store more data and handle complex operations, which is fairly useful 17:27:18 ... when working with large AI models 17:27:20 q+ 17:27:28 q+ 17:27:34 q+ 17:27:35 ... exploring the native OS integrations 17:27:54 ... now we're moving into the discussion phase 17:27:54 ack McCool 17:28:03 ... I'd love to hear your thoughts and feedback 17:28:08 ... how we move forward 17:28:31 McCool: you spent a lot of time discussing how to enable sharing data between apps 17:28:35 RobKochman has joined #web-hybrid-ai 17:28:48 Domenic has joined #web-hybrid-ai 17:28:50 ... however big concern the web is controlling the sharing the data bewteen apps 17:29:05 q? 17:29:05 ... you don't wan to give all apps access all personal data 17:29:26 s/wan/want/ 17:29:32 chunhui: we strore the data in the @@ 17:30:11 McCool: in one of our enterprise applications you can do access controls for accessing certain subsets of data 17:30:13 ora has joined #web-hybrid-ai 17:30:37 ... having a mechanism for access control or you can explicitly grant some data 17:30:40 ack kenji 17:31:18 kenji_baheux: i was wondering if you could share some of the details of the trigger of this exploration 17:31:26 ... like the use cases 17:31:59 concrete examples of use cases (internal) or from actual partners? 17:33:06 chunhui: the use cases is 2 different apps not directly share the same data, but into the same local database 17:33:36 q? 17:33:45 ack reil 17:33:54 zolkis has joined #web-hybrid-ai 17:34:05 reillyg: to understand the context here, this is a proposal that would be exposed by the browsers? 17:34:09 chunhui: yes 17:34:25 reillyg: the API will allow multiple sites to insert data into this database 17:34:41 ... and they can prompt the AI to user the data @@ 17:35:08 q+ 17:35:46 ... the results from the AI are visible to the apps making the query 17:35:50 q+ 17:36:05 ... if the AI uses information about travel, the app can see the response from the AI 17:36:19 chunhui: if the apps have permisson, yes, they can 17:36:28 ... they can benefit from the whole database 17:36:53 reillyg: granting the safe access to their own device model to this database? 17:37:08 q+ 17:37:14 chunhui: another impl to implement the insert/update entries 17:37:22 ... for your reference 17:37:54 q? 17:38:05 ack zol 17:38:10 zolkis: I understand that you want to build this solution 17:38:28 ... is it mandatory requirement that you have booking and flight in separate apps? 17:38:45 ... if you can do it in the same app, then you @@ 17:39:03 ... basically you want a web app 17:39:14 q? 17:39:14 q? 17:39:15 chunhui: let's say the Chrome prompt API 17:39:33 q+ 17:39:52 ... web devs use window.ai to connect LLM 17:40:05 ... it's just extension for Chrome's prompt API 17:40:16 q+ 17:40:22 ... the create method is the one in the Chrome API 17:40:31 ... we just make it access multiple models 17:40:43 [chunhui shows sample usage] 17:41:21 ack kenji 17:41:22 chunhui: this API uses Chroma DB 17:41:41 q? 17:42:06 kenji_baheux: you showed gemini-1.5-flash 17:42:18 ... but you also have like an API key 17:42:23 ... people would use this app 17:42:31 ... I'm really curious about how it's gonna work 17:43:03 ... gemini_api_key 17:43:07 q- as my questions was covered by kenji_baheux 17:43:18 q- 17:43:41 ... @@ connects to an on-device model 17:43:52 ... how it's going to work? 17:44:50 kenji_baheux: if the code runs on the browser, then you expose the API key 17:45:11 chunhui: yes, the API key will be exposed 17:45:18 ... if it's a cloud-based model 17:45:25 ... by the browser 17:45:35 Also, would UAs be expected to keep track of API key usage, so the user could find an app that has used up all the tokens… 17:45:46 ack Dome 17:46:07 Domenic: Google is not interested in creating a cross site database to store the info since it breaks the web security model 17:46:32 ... if you want to share data between sites you should explore the traditional ways of doing that 17:46:41 ... for example using things like authentication 17:46:54 ack Mc 17:47:08 ... should not use some sort of database since it enables cross site tracking 17:47:37 McCool: it clearly violates cross sharing restrictions 17:47:46 q? 17:47:49 ... we want each app has its own storage 17:48:01 cyns has joined #web-hybrid-ai 17:48:18 ... regarding the API key we could generate and API key per session 17:48:29 ... limit to the particular browser instance 17:49:00 ... where does the model run not enough to identify @@ 17:50:23 McCool: how do you deal with the web storage model? 17:50:37 chunhui: I think authentication is a very traditional topic 17:51:08 McCool: different sites have complete different developers 17:52:13 q? 17:52:21 chunhui: let's say one vendor develops 2 different apps 17:52:24 q+ 17:52:40 ... they have the same user information 17:52:41 denkeni has joined #web-hybrid-ai 17:52:46 ... so they can trust each other 17:53:20 ask kenj 17:53:27 Roy has joined #web-hybrid-ai 17:53:27 ack kenj 17:53:35 kenji_baheux: afaiu Huawei has a miniapp ecosystem 17:53:57 RRSAgent, make minutes 17:53:59 I have made the request to generate https://www.w3.org/2024/09/25-web-hybrid-ai-minutes.html Roy 17:54:05 ... it is very relevant to that system? 17:54:15 chunhui: maybe miniapp is one scenario 17:54:21 ... that can benefit from this API 17:54:50 ... but we're trying to say if the API is provided by the native OS whether it is a native app web app or miniapp 17:55:03 q? 17:55:08 q+ 17:55:16 ... they can share the local device 17:55:22 ... the same one user 17:55:28 ack Domenic 17:56:02 Domenic: i think the issue is that the security model for the web is very different from the security model for native apps or mini apps 17:56:16 q? 17:56:16 q+ 17:57:02 ... we cannot have the same security model 17:57:14 q+ 17:57:19 ... i think the cross site storage thing doesn't work 17:57:25 ack zol 17:57:28 ... but the use case is important 17:58:22 zolkis: I wanted to ask if you considered @@ then you don't violate the browser security model 17:59:11 ... on the edge side 17:59:24 q? 17:59:46 Domenic: on the other hand, the other part of the proposal (e.g. model switching) is worth exploring further (paraphrasing). 17:59:56 chunhui: yes you can implement this on the edge 18:00:02 q+ 18:00:09 zolkis: OK 18:00:14 q- 18:00:18 ack reillyg 18:00:36 reillyg: mechanism for loading multiple models, local and remote 18:00:49 ... the local model concept is targeting OS built in models 18:00:59 ... Gemini running onthe device for example 18:01:32 ... what about loading model proveide bythe app 18:01:39 ... like webnn and webgpu 18:01:50 chunhui: yes 18:01:57 ... you can use webgpuo r webnn to integrate a lot of models 18:02:03 ... Gemini or others 18:03:12 reillyg: i'd be interested in understanding how taht works 18:03:25 martin: the security model is a challenge 18:03:35 ... this is something we need to solve 18:03:40 ... is there any interest beyond? 18:03:47 ... if we solve the problem of security 18:04:06 McCool: let's follow up in the web machine learning CG 18:04:20 McCool: model switching and RAG aspects (iirc). 18:04:50 rrsagent, draft minutes 18:04:51 I have made the request to generate https://www.w3.org/2024/09/25-web-hybrid-ai-minutes.html martin 18:07:12 martin has joined #web-hybrid-ai 18:15:05 martin has joined #web-hybrid-ai 18:15:38 ktoumura has left #web-hybrid-ai 18:16:57 Roy has joined #web-hybrid-ai 18:18:41 xiaoqian has joined #web-hybrid-ai 18:19:24 reillyg has left #web-hybrid-ai 18:19:41 martin_ has joined #web-hybrid-ai 18:23:20 xfq has left #web-hybrid-ai 18:56:50 Roy has joined #web-hybrid-ai 19:07:40 martin has joined #web-hybrid-ai 19:14:50 Roy has joined #web-hybrid-ai 19:41:02 martin has joined #web-hybrid-ai 20:08:12 martin has joined #web-hybrid-ai 20:08:23 xiaoqian has joined #web-hybrid-ai 20:13:55 martin has joined #web-hybrid-ai 20:16:32 Roy has joined #web-hybrid-ai 20:17:42 kenji_baheux has joined #web-hybrid-ai 20:17:56 present+ 20:27:44 martin has joined #web-hybrid-ai 20:34:53 Roy has joined #web-hybrid-ai 20:37:06 kenji_baheux has left #web-hybrid-ai 20:52:28 Roy has joined #web-hybrid-ai 21:15:40 martin has joined #web-hybrid-ai 21:16:25 Roy has joined #web-hybrid-ai 21:24:46 martin has joined #web-hybrid-ai 21:29:33 martin has joined #web-hybrid-ai 21:45:17 martin has joined #web-hybrid-ai 21:47:06 martin has joined #web-hybrid-ai 21:48:14 Roy has joined #web-hybrid-ai 22:11:16 Roy has joined #web-hybrid-ai 22:47:49 martin has joined #web-hybrid-ai 22:52:11 Roy has joined #web-hybrid-ai 22:58:18 martin has joined #web-hybrid-ai 23:45:37 martin has joined #web-hybrid-ai