Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Building AI Apps with Elixir - Charlie Holtz - ElixirConf 2023 #212

Open
nelsonic opened this issue Sep 29, 2023 · 4 comments
Open

Building AI Apps with Elixir - Charlie Holtz - ElixirConf 2023 #212

nelsonic opened this issue Sep 29, 2023 · 4 comments
Labels
discuss Share your constructive thoughts on how to make progress with this issue elixir Pull requests that update Elixir code enhancement New feature or enhancement of existing functionality T25m Time Estimate 25 Minutes technical A technical issue that requires understanding of the code, infrastructure or dependencies

Comments

@nelsonic
Copy link
Member

ElixirConf 2023 - Charlie Holtz - Building AI Apps with Elixir: https://youtu.be/TfZI5-oQSqI
image

@nelsonic nelsonic added enhancement New feature or enhancement of existing functionality discuss Share your constructive thoughts on how to make progress with this issue T25m Time Estimate 25 Minutes technical A technical issue that requires understanding of the code, infrastructure or dependencies elixir Pull requests that update Elixir code labels Sep 29, 2023
@nelsonic nelsonic added this to More ToDo ThanCanEver Be Done in Nelson's List via automation Sep 29, 2023
@nelsonic
Copy link
Member Author

"Magic Box" ...

image

In a nutshell, this is the problem with AI. 😕

@nelsonic
Copy link
Member Author

Recommend watching. Thinking of building something similar.

@nelsonic
Copy link
Member Author

@LuchoTurtle keen to hear your thoughts/feedback. 💭

@LuchoTurtle
Copy link
Member

It was a fascinating talk! The way each one was explained was clear-cut and simple, but it shows how powerful we can use AI models (hopefully open-source) to tackle otherwise challenging parsing scenarios.

Shout-out to Task.async, makes it look super easy to shoot a process to the AI model and not having to wait for it - dwyl/elixir-http-request-tutorial#2 (comment).

GenServer

The GenServer approach piqued my interest, mainly because I've had the chance to see how LLMs are prompted in these applications (like through Langchain) and how they are parsed. I've seen Rafa using Azure AI's platform to deploy a simple chatbot, like in the image below:

image

Adding a system message and specifying how the bot should act is prompt engineering (even though considering this "engineering" is debatable by itself but whatever) at its core and it's funny how crucial it is to get the models to properly understand user queries and how to properly get an acceptable output (which is why things like https://github.com/guidance-ai/guidance exist).

The reason why I'm saying this is because it's interesting seeing him employ these techniques to yield correct results from the agent, which is what makes these demos successful.

image

And the way he's parsing the output from the model is exactly why frameworks like guidance exist.

image

When adding AI to an application, the hardest part seems to be how to get a good prompt going. I've had my run-ins with https://github.com/CompVis/stable-diffusion and 99% of the work is prompting, knowing which keywords go hand-in-hand, and adding or reducing weights to some keywords.

But when using LLMs to get these simple responses and answers as shown in the video (and actually using an LLM to check the content of the answer and not having to consider all the edge scenarios when parsing user input) is THIS simple, even more so with platforms like Azure AI making it even easier for us, the hardest part is being creative with it.

Was actually curious about the ~X sigil he implemented, was looking forward to knowing more about it :/

Generative Agents

Got SUPER excited with the third approach of self-sovereign and aware agents and how EASY it seems to make it in Elixir!

image

The Shinstagram example was uber-cool. Seeing each agent interact with each other whilst having their own personalities, all in real-time, looked pretty much like real life! I would LOVE to see the code for the demo, I absolutely adored this part of the presentation.

It's so interesting to see how this approach can effect other fields. For example, games! Characters in Red Dead Redemption 2 (apparently) had their own routines hard-coded. But imagine how much more dynamic (thus boosting replayability) the world would be if each one was an LLM agent, with their own set of stories/memories, and seeing them interact with each other and the player! I know for sure this is already being implemented somehow, just can't wait to see it!

I'm already starring https://github.com/replicate/replicate-elixir!
And seeing https://replicate.com/collections/image-to-text, it's curious to see that BLIP is available (which I previously mentioned in dwyl/image-classifier#1). So this could very much be viable in imgup (although it's paid, so it might be easier to scale it down to a local model for now).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discuss Share your constructive thoughts on how to make progress with this issue elixir Pull requests that update Elixir code enhancement New feature or enhancement of existing functionality T25m Time Estimate 25 Minutes technical A technical issue that requires understanding of the code, infrastructure or dependencies
Projects
Nelson's List
  
More ToDo ThanCanEver Be Done
Development

No branches or pull requests

2 participants