AsTeRICS-Grid icon indicating copy to clipboard operation
AsTeRICS-Grid copied to clipboard

Feature: search YouTube at use-time from 1-3 typed words, with the AI's guess shown before the results

Open bigbrownjeff opened this issue 3 months ago • 4 comments

The gap I've encountered

Asterics AAC already plays YouTube well. But looking at GridActionYoutube and youtubeService.js, every path is author-time: a caregiver or therapist configures a grid element with a fixed search term, channel, or playlist, and the user presses a button that plays what was configured earlier.

There is no use-time path. If the person using the board wants to watch something nobody thought to pre-configure, they cannot get there themselves. They have to wait for someone to edit the board for them.

For a user with a very low typing budget this is the difference between watching what they chose and watching what somebody chose for them last month. I maintain a small private browser app for one adult user who types one to three words at a time, using one hand today and preparing to move to eye gaze. Author-time playlists went stale within a week. Being able to type "welding" or "guitar repair" and reach a real video, unassisted, turned out to matter more than any other feature in the app. Their intellect hasn't diminished only their physical capacity.

I am proposing one more play type alongside the existing YouTube setup.

Why this is not the AI idea the project already discussed

I read #602 before writing this, and I think the objections raised there were largely correct.

@ms-mialingvo's objection was that when AI forms a sentence and gets the meaning wrong, it is hard or impossible to correct, and it does get it wrong. That is right, and it is the reason I would not propose AI sentence-forming here either. But the failure modes are not comparable:

  • A wrong AI sentence puts words in the user's mouth. It is spoken, it is attributed to them, and the damage is done before they can react.
  • A wrong AI search query returns the wrong videos. The user sees it is wrong, ignores it, and types something else. The cost is one screen of bad suggestions.

So the risk is different in kind, not just in degree.

@klues' objection was that the word-form approach works offline, which matters. Also right. But it does not apply to this lane, because the YouTube lane is already online-only. Nothing about adding query expansion to a network-dependent surface costs anyone their offline capability. When the network is down, YouTube is down anyway, and this feature is simply absent along with it.

Proposed Contribution: the trust probe

The mechanism that made AI acceptable in my app is not the expansion. It is showing the user what the model guessed, verbatim, before showing any results.

The flow is:

  1. User types a fragment: welding
  2. The fragment goes to a server-side endpoint that returns structured suggestions, not prose: {"queries": [...], "channels": [...], "topics": [...]}
  3. The raw returned object is rendered on screen, as text, before any video loads. The user reads "the computer thinks you meant: TIG welding for beginners / welding cast iron / stick welding basics".
  4. Each suggestion is a large button. Pressing one runs it as a normal search. Pressing nothing costs nothing.

That third step answers "when AI gets the meaning wrong it is tricky or not possible to correct" by making the guess inspectable before it has any effect. The user is never surprised by the AI, because they read it first. In practice it also builds calibration over time: the user learns when to trust it and when to retype, because they have seen it be wrong and have seen that being wrong was cheap.

I think this pattern generalizes well beyond YouTube, and that is really why I am opening the issue rather than just sending code. If the project ever revisits AI for anything, "show the raw guess before it takes effect" seems to me like the guardrail that makes the difference, and the YouTube search lane is a low risk place to try.

Sketch

+--------------------------------------------------+
|  you typed:  welding                             |
+--------------------------------------------------+
|  the computer thinks you meant:                  |
|                                                  |
|   +--------------------------------------------+ |
|   |  TIG welding for beginners                 | |
|   +--------------------------------------------+ |
|   +--------------------------------------------+ |
|   |  welding cast iron                         | |
|   +--------------------------------------------+ |
|   +--------------------------------------------+ |
|   |  stick welding basics                      | |
|   +--------------------------------------------+ |
|                                                  |
|   +--------------------------------------------+ |
|   |  none of these - type again                | |
|   +--------------------------------------------+ |
+--------------------------------------------------+

Constraints I would hold it to, which I believe match what the project already expects: real <button> elements only, so scanning and gaze selection work; nothing hover-dependent; no timeout on the suggestion screen, since a scanning user may need a long time to read four options; the "type again" escape always present and always in the same place.

Open Questions

Probably more I haven't thought of but here's a start:

  1. Data protection. Sending a typed fragment to a model provider is an outbound transfer of user input. Given the project's users and funding I assume this has to be opt-in, off by default, disclosed in plain language, and ideally provider-configurable rather than hardcoded. Any suggestions?
  2. Who pays for inference. My app uses a server-side key that never reaches the browser. A hosted app used by many people cannot absorb that cost the same way. Bring-your-own-key, or self-hosted endpoint, seems more realistic than anything centrally funded. Thoughts?
  3. Search quota. Separately from the AI question: search.list is quota-limited to 100 calls per day per project by default (https://developers.google.com/youtube/v3/determine_quota_cost). If use-time search is exposed to every user rather than fired only on a pre-configured button press, call volume goes up rather than down. Don't know if this is a hard block yet.
  4. Offline. Covered above, but to be explicit: I would not want this to add any code path that degrades the offline experience. If it cannot be built that way, it should not be built.

Persistence

  • Who maintains it after me. Once merged, the code is the project's, under AGPL-3.0, maintained by the project under its normal process. I am not asking for a plugin boundary, a separate module I own, or any special status. If a maintainer would rather rewrite my version to fit house style, that is a better outcome than me owning a corner of the codebase.
  • What I am committing to. I will do the work of getting it in: the issue, the discussion, the code by hand, the revisions, the beta review. Afterwards I will fix what I broke. I am one person and I am not going to promise a long-term rotation I cannot guarantee.
  • What happens if my own app stops. Nothing here depends on it. The app it came from is private and is not a dependency of anything I am proposing. No service of mine sits in the path, no key of mine, no host of mine. If I disappear tomorrow the merged code keeps working, because the only external thing it talks to is a model endpoint the deployer configures.
  • Which is also why I am asking first. If the answer is "we do not want AI in this app, at all, for reasons that have not changed since #602", that is a completely reasonable answer. I am not trying to reopen a settled decision. I think this lane is different, but you know your users better than I do.

What I am asking for

A maintainer's read on whether this is worth doing at all, before I write anything. If it is, I would want to agree the shape here first, then implement it by hand in a small PR against a single issue, per the collaboration guide.

To be upfront, since the guide is explicit that fully AI-generated PRs are not reviewed: I use AI tooling in my own work, and any PR I open here would be code I have written, understood, and can defend line by line in review. If you would prefer a stricter statement than that, tell me what it is and I will try to hold to it.

bigbrownjeff avatar Sep 02 '26 12:09 bigbrownjeff

Hi, sorry - this huge amount of text is too long for me to read carfully at the moment (I assume it's AI generated?!).

However, I can respond to this:

There is no use-time path.

This is not true. You can already type something on a keyboard and then search on YouTube for it:

  1. Import a gridset with a keyboard, e.g. this direct link to "Asterics Grid default": https://grid.asterics.eu/?gridset_filename=default.grd.json
  2. Go to "Keboard" on the start page and type something, e.g. "Cats"
  3. Click on the YouTube button at the top right
  4. The app navigates to the YouTube grid and shows a video which resulted in searching for the given term (e.g. "Cats")
  5. With Next video and Previous video you can navigate through the search results

So please take this into account, and explain shortly in a few lines what is your idea or why there is a need to extend this and how.

klues avatar Sep 02 '26 13:09 klues

Thanks for I guess trying to read it. No not AI generated. Just a guy writing his first submission for a public repo about something that he built for a friend w ALS.

Great if you have it. I don't think you do and that you didn't put any effort into reading my post. This is about ai expansion of search terms. Think how you refine searches if you want...you use lots of words. Now imagine you're locked in and can't but there's a tool that can come close at guessing the expansions based on training and history. So it knows when you type cats you're looking for caterpillar trucks.

You obviously have an AI bias and seem like an obnoxious person to work with so consider this request revoked. If you want to gate keep as a snark rather than help people that's on you.

Hot tip- if you can't be bothered to read, ai is great at summarizing for those who struggle with words.

bigbrownjeff avatar Sep 02 '26 13:09 bigbrownjeff

Hey, I'm very sorry that my answer obviously made you upset, this was of course not my intention! 😒 I just saw the huge amount of text, shortly scanned it and the obviously wrong There is no use-time path and then the ASCII code sketch made me think it's just some AI generated thing. That's the reason I just answered to the obviously wrong fact and asked for a short summary of your intentions. It was nothing personal against you, and I'm sorry that you've obviously put much effort in writing the text and I did not respect that!

But maybe you understand me better if you know that I've already invested many hours of code review, coding guidance, testing etc. in some issues just to find out at the end, that the person is using only AI, and in the end there is a 2000 lines piece of code which is not working at all and nobody understands - so countless of hours of work just to be thrown away. I'm not against AI in coding in general, but I'm against burning ressources like in these cases I've encountered. That's the reason I'm maybe suspecting AI usage too quickly in some cases, like in this one.

You obviously have an AI bias and seem like an obnoxious person to work with so consider this request revoked. If you want to gate keep as a snark rather than help people that's on you.

This is unfair - I didn't write anything inpolite or personal against you, I just assumed that your text is AI generated for the reasons I've explained.

I've now read your whole issue, and if you want, we can discuss it further. But please tell me first, if you're still open to it.

klues avatar Sep 03 '26 06:09 klues

Hi Jeff,

this a a very interesting idea and I hope we can continue the discussion about possible ways to add LLM-based capabilities in a meaningful way.

Of course I see the ethical / privacy / "slop-related" problems of AI/LLM usage - but also the great benefits for AAC users and accessibility applications in general. I suspect that there are (or soon will be) options for in-browser leightweight LLMs which do not need API keys from bigtech providers and could be trained with local data, or prompted in a way that is useful for a person's communication in a given context?

I like the proposed strategy of adding suggestions as cells/grid-elements automatically, and I think the youtube search could be a nice testbed for such a feature. If we find out that it is helpful for users we could also think about more comprehensive applications, related to what was discussed in https://github.com/asterics/Asterics-AAC/issues/602.

An important question is IMO how we could integrate such (more experimental / "advanced") features without adding complexity or causing confusion for the majority of the users who already rely on Asterics AAC.

I'd vote for re-opening, although the start of the conversation was a bit rocky ..

ChrisVeigl avatar Sep 03 '26 13:09 ChrisVeigl