Resources

Positron AI Session (George Stagg, Winston Chang, Tomasz Kalinowski , Carson Sievert) | posit::conf

George Stagg, Winston Chang, and Tomasz Kalinowski introduce AI capabilities in Positron, including Positron Assistant, a tool still in preview that enhances coding and data analysis. 0:00 Introduction to Posit's approach to AI 0:23 George Stagg: Positron Assistant 11:03 Winston Chang: Databot 21:30 Tomasz Kalinowski: ragnar 31:13 Carson Sievert: chatlas 41:42 Q&A posit::conf(2025) Subscribe to posit::conf updates: https://posit.co/about/subscription-management/

image: thumbnail.jpg

Transcript#

This transcript was generated automatically and may contain errors.

So, yeah, my name is George I'm a software engineer at Posit and I want to talk about Positron Assistant. I realized, you know, there's been lots of demos yesterday today. We had James just earlier. Joe and Hadley's keynote was yesterday, which I really recommend going and watching if you want a general idea of Posit's approach to Gen AI.

So I thought what I would do instead since I don't really have enough time to properly show all the different features of Positron Assistant is just take a minute step back and just go. Okay. What about people in the audience who are saying you've convinced me, how do I get started? So that's what I'm going to show today. So I have Positron open. I've got some some script. And I'm going to show you how to just get started get logged in and get Positron Assistant set up because it's actually still in preview, which means there's no big arrow in the app that says here are the Gen AI features. You got to turn it on and to do that you want to open the command palette command shift P and search for settings.

Spell it correctly and open the settings in there search for Positron Assistant. Enable something like that and that's the setting you're looking for there, where it says enable Positron Assistant and AI system for Positron. Notice the preview badge. That is why you have to do this. Take that box and you're pretty much good to go. What you need to do now though is restart Positron.

I'm not going to do that. I'm going to show you a little developer trick. If you open up that command palette again and go down to search for reload window, nice little trick there to do essentially the same thing. At this point Positron Assistant is available. And it would be in the side panel if I wasn't zoomed in. If I zoom out slightly you can see there's a little Positron Assistant icon and if you click on that you get to Positron Assistant.

As a few people have mentioned currently in the version of Positron that is available we have Anthropic and GitHub Copilot as LLM providers. So what you need to do is actually log in to those LLM providers to power these LLM based Gen AI features of assistant. If you're not logged in there'll be a big button there that you can click and it takes you straight to the right place.

Now we are working on very soon having GitHub Copilot also providing chat interface, but currently it provides completions in the editor only and Anthropic is used for the chat panel. So to get the full Positron Assistant experience today, the best thing to do is log into both and that does mean getting an Anthropic API key. Now to do that, there's a few ways. If you have an organization that has some agreement with Anthropic, you can probably get an API key that way. Otherwise you go to the Anthropic website sign in follow their docs to get a developer account and grab an API key that way. Now once you have one paste it in the box hit sign in and you're good to go.

GitHub Copilot very similar. The only difference is you don't really need a key. There'll be a sign in button you click on that it opens a web browser and you log into GitHub in the usual way and that will get you logged in with GitHub. Okay, we are working on adding more providers. I believe in the further future there'll be OpenAI compatible endpoints as well as enterprise accounts like AWS, but currently this is where we are today.

Why Positron Assistant stands out

Let's get started. So some demos. Let me explain why is Positron Assistant better than other coding assistance that you might find in the extension store? And in my opinion, it's all because of the context. It's the fact that Positron system has been designed to plug into all those extra features that we've added to Positron to make data science great. It knows about the console. It knows about the variables pane. James showed that earlier. It knows about the plot window. You can ask it if you have a plot you can say take a look at my plot and tell me about it and it can do that. All of this context engineering is what makes Positron Assistant so nice to use because you can ask it a question in natural language, and it knows what you mean.

All of this context engineering is what makes Positron Assistant so nice to use because you can ask it a question in natural language, and it knows what you mean.

So what I'm gonna do is I'm just gonna close this and I'm just gonna open the welcome window just to get things. There we go back to where we were before. I'm gonna load some data. So let's have empty cars, right? So I've just loaded empty cars in the console. I know that's very small, but it's not so important for this demo. In fact, let me just close that. There we go. That's better. And then I'm gonna say about the data. And again, you know, you've probably seen demos like this in the lounge and earlier today, but the point is is that I don't have to say tell me about empty cars. I don't have to say tell me about the data. I've just loaded. Positron Assistant will use that context that I just talked about to generate its answer. It kind of just knows what you mean, and that's really nice.

So here you can see it shown. It's saying okay. Here's some information about empty cars. I was probably already in the data set, but it knows how to use it. Now at this point I could run this code, but let me give you another example of this. Let me go back to this script that I had open and try and run it. And what you'll find is in the console at the bottom there there's an error. Now if you've programmed in R before you can probably pretty quickly be able to realize what that error is. But not everybody is an expert data scientist, you know, people are new, people inherit scripts from other people. Sometimes it's one minute before a Zoom meeting and a cat walks on the keyboard. You know and you have to get this fixed quick. Things happen. If I ask assistant, open up a new window and just say you know, can you fix this error for me? It will know what I mean and it will go away read that error message in the console and say oh, I know what's wrong. Yeah, you need a tilde. Yeah, you need this to be a lambda function. You know, however you want to describe it. You need this to be a function.

Ask, edit, and agent modes

Great. Okay, so you might think okay. So Positron Assistant can help me fix errors. That's nice. Why doesn't it just do it? And that's the next thing I want to show you with the introduction to Positron Assistant is the different modes. And James briefly hinted on this in the last demo. There's three modes currently in Positron Assistant: ask, edit, and agent. Now ask is the simplest of the modes. It's kind of like logging into, you know, ChatGPT or or Claude on the web without any kind of extra settings or fancy things. You can ask questions. It'll give you answers. It'll give you code, but it can't run code for you and it can't edit your files. It's a very simple back and forth and some people prefer that workflow and that's fine.

If you wanted to give assistant more power, you can switch to edit mode. And what edit mode does is it gives it a few extra tools. In particular, it lets it edit files in your workspace that you have open. So now rather than just telling me what the error is, I can say, okay. Can you please fix that for me? And it should hopefully go away and do it. Now this is quite a small file with just a small error, so this, you know, we could have just read that answer and gone in there and fixed ourselves. But you know, this could be a 2,000 line workflow. This could be, you know, this might have changes that are at the top of the file at the bottom of the file, you know, not localized to one place. Not the case here, but it could be. So it's really nice in that case to have these sort of diff views where you have nice tools that are already built into the editor to show where and how the code has been changed. So let me keep that change. Has it worked? Yes, it has. It's fixed the problem.

Now I want to talk about agent mode briefly. But before I do I just want to show you a little flourish of magic that I like about assistant and that's it's not actually in the chat panel, but once you've made a change like this if you use git and you turn assistant on a little button appears in the git pane so that when you make a change you can press that button and it will write a commit message for you. Now that sounds simple, you know, how much time is that save me 30 seconds, whatever, but you know, don't sleep on this. It's actually a really nice feature. Like just removing those little things that slow you down in the day just feels really nice. And I think that's what we're aiming for with some of these features.

Agent mode is far more powerful. It has access to all of the available tools in Positron. It has access to a bunch of tools that are third-party provided if you have extensions installed. You can even add MCP servers. I believe in the latest builds of Positron. This is much closer to something like Claude code or these sort of software engineer targeted coding assistance where you will run these tools in a loop and the agent is allowed to then read the output and then continue and iterate over and over running these tools. I won't do it here because last time I did it it took 10 minutes, but if I wanted to I could take these five scripts and tell Positron Assistant in agent mode please turn this into an R package. And you know, it will go away and spin. It will write documentation. It will add Roxygen commands. It will even write tests using testthat and then it will run in the console devtools test and check that those tests are running and doing what they expect.

In this case in this particular run it actually found a problem with its own code that needed to be fixed in the terminal and it did that. It ran terminal code to move files into the correct place and it finally ran devtools check. Everything's happy. And it came back to me with a bunch of check marks saying okay, I'm ready to submit to CRAN. I wouldn't submit to CRAN, but you know it tried its best.

The point here is that with this you could really do a lot very quickly. And I just want to say, you know, this is possible and it's amazing what these models can do. But also what I didn't show here was me clicking. Yes. Yes. Yes. Yes. Yes every time the code the model wanted to run some code or run a terminal command. I read that terminal command made sure it did something reasonable and then clicked to go. So, you know, one of the principles that we're trying to follow here is keeping a human in the loop as closely as possible to keep that human loop really tight. So what we don't want to do is just say YOLO and you can go go go crazy like this example. But if you are willing to spend some time to read what the models want you to do, work with the model, you can do some really great things. Okay, I'm gonna pass you on now. Thank you very much.

Databot for exploratory data analysis

Okay, I'm gonna be talking about Databot and if you saw Joe's keynote, Joe's portion of the keynote yesterday, you know something about it. So in contrast to what George was showing with Positron Assistant, Databot is more of like it's more of a tool for exploratory data analysis, and it's more of like a like a partner to help you get that done.

So first things first. I'll show you how to install it. So to do that if you go to the extensions pane here, it is not included with Positron, but so you have to get the extension. It's because it's right now it's in a very early research preview phase. So here you can search for extensions. You type in Databot and it will come up here. I've already installed it, but if you haven't installed it and you have to click it this will say install and you click on that.

Okay, so now after you've installed it you can launch it by saying open Databot and the first time you do that, zoom in here, it'll say Databots are not enabled. It must be enabled in the user settings. And so there are a few steps for this. This is what we're doing at this stage to keep it, make sure that people really want to use it before they start using it. Hopefully things won't go wrong, but so what we have to do here is you have to type acknowledged here that this is a research preview.

Enter. Okay. Now when I close this I open Databot again it will come up here. Now I've already in the middle of a session here, but you will probably see something like this. And this is running live. I guess this is okay. It's streaming in. Okay. All right there we go. So it'll say I'm Databot and it'll give you some suggestions about how to get started. Now for this particular demo here, I have already loaded some, or I'm already in it. I've already downloaded data. This is from Tidy Tuesday. It's from the Tidy Tuesday repository. I cleaned this repository and there's one that I thought was interesting. It is about measles. Measles yeah, so I'm in that directory and I have a little recording here to show because the speed at which it happens and what happens is a little bit unpredictable so I have this recording.

So let's get started here. So when Databot starts, it'll give you some suggestions about how to get started right and you can just click on them. So I clicked on help me import a data set, a new data set from a file. And it goes and it looks at what's available and in this case, there's these two files, these two CSV files. It's about measles cases and I ask it to load both of them.

Okay, now again, this is massively sped up. Okay, so now it's loaded this data and I'm sorry. I I'm acting like I can actually interact with this but I can't because this is a recording. I got confused there. I'm sorry.

All right, so then I chose hey create some visualizations about showing disease patterns. So now it's gonna go do that and it will normally it'll try to use ggplot2 if you're using R. And you can see there's a disease trends over time and there's a big spike here which is interesting. And then it's decided to split up by region. And this is seasonal patterns like over the course of every year.

Okay, and then I also provide the summary of like some of the findings here. It's not showing here. But sometimes it gets very excited. Like when I did this I ran through this an earlier time it said like well, this is in certain countries. This is a catastrophic failure of the health care system, etc, etc. So that is an interesting thing that I had not seen before. Sometimes these LLMs they start showing their personality that way and so you have to be, you know, you have to be mindful that you have to bring your own judgment to it and don't just take everything that it says for granted. Now as it's doing this it's producing code and the code is that is really valuable because that is reproducible and that is you know it's not editorializing in the code. So I ask it now. Let's look for outbreaks.

And again this, I'm just letting it fly through all this writing all this code and do this stuff. When you're working with this, you will probably want to be more mindful and more careful on this, you know, in the interest of time I'm letting it sort of just go through these things. Oh, here we go. There it is. Major outbreak discoveries, most devastating single outbreaks, etc, etc.

All right, so this is just a sort of a flavor of what it can help you do. Okay, next I asked it let's create a Shiny app to explore the data. And it will sit and spin here for a while while it's doing that. Again, I sped up this video and it might look like it's not doing anything for a while. But that's what it does when it's writing a lot of code to a file. So this is the dashboard that it created to help explore the data, which is, you know, every time I see these things I'm really surprised at how good they are. It's not perfect. But it can get you very far and you'll have to bring your own skills and your judgment to sort of tweak the things that it produces, but it does give you a good start.

You can also ask it to make a report. You slash report. That's a command and that will generate a Quarto document, a Quarto document describing the things that that are sort of summarizing the things that it's done before. Okay, and it'll just stream it into this editor here. And one thing to pay attention to is that at the top it says this report is created using artificial intelligence under general human direction. So at the time of generation, the contents have not been comprehensively reviewed by human analysts and we think that's important. You know, you don't want to just generate one of these things and then send it off without vetting it yourself and looking at like hey, is this good information to be put in here? But again, it will get you started.

All right, so that whole thing will stream into there. And I will show you what that looks like. So I have it loaded up over here. So this is the report. This is again this is the same stuff that you saw before, right? And that can be really helpful and you can also tell it, it will provide a proposal for the report that it'll make and you can adjust it if you want before it actually goes and does it.

Okay, now the last thing I want to show you right here is that you can ask it to save to a memory file the things that it's done. So back it up a little bit. There we go. So I clicked on the elephant icon there and I said and I clicked on save to memory file. And what that does is it fills in this slash save memory, that's another command, and I give it a little bit more information: save information about the structure and content of the data files. So it does that, spins, and it writes to a file called databot MD and just to give you an idea of what's in there, open it up. So it's a markdown file just summarizing this stuff and there's actually a lot of information. There's actually a lot more than I expected. But the purpose, the usefulness of that is that if you start a new conversation then you can ask it what do you know about the data and now it's telling me stuff that it knows because it has the memory file, not because I had to load the data this time.

All right, and I'll show you in Positron here. I can look at previous conversations here. I can go back to them and one last fun feature is that you can export it. You can export the conversation. In this case I export it to HTML and then when I open that in the browser, this is actually that all that same content in the conversation saved in an HTML file and so you can save that and send it to somebody and it's all contained in a single file.

ragnar for retrieval-augmented generation

Hello everyone, my name is Tomas. I am very excited today to tell you about ragnar. Let's say you open up an Elmer chat with GPT 5 and you ask it a simple question: does Quarto support typist? And if you're lucky and you know about that verbosity parameter you will get a short answer with a URL at the bottom that you can follow and find out it's all made up. It's wrong. Quarto does support typist. If you're unlucky, then you'll get two pages of slop telling you to make a makefile and you'll spin for ten minutes before you find out it's all wrong. So this is the hallucination problem and RAG is a technique to address this.

The core idea is quite simple. You take your trusted known to be correct information and you place it in context for the LLM to see before it generates the final answer. And ragnar is an R package that helps you do that. It has a set of tools for creating document stores and then a set of tools for searching a document store or letting an LLM search a document store. ragnar works great with Elmer and Shiny chat. If you hook it up with that, you'll get something like this. You type does Quarto support typist. You'll see that the LLM now searches the document store, retrieves the top 10 or 20 most relevant excerpts from the website and then it generates an answer. That's correct.

Quarto doesn't, or sorry, ragnar. It doesn't just work with Elmer. Or if you're building your own R package, you can also hook it up to external LLM applications. So here for example, I have it working with OpenAI's Codex and you see it has the search Quarto docs tool available being served by ragnar. So this is a way to augment other applications.

All right. So here's all the code that you need to run to create a ragnar store for the Quarto docs. The first thing to notice is it's not a single function call. ragnar tries real hard to be transparent so you can inspect all the intermediate steps. But it's not a lot of code so we can walk through it. The first step is you create a store. Under the hood a store is just a DuckDB file. So you just say where you want it on the file system. You also pick an embedding function at the time that you create a store. So here we're using an embedding model from OpenAI. Embedding models are basically functions that transform a piece of string or a piece of text into a numeric vector. And the magic of them is that similar meaning strings transform to similar vectors and this magic comes from machine learning. So embedding models are typically large things kind of like LLMs and you'll access them through a provider.

In ragnar we're using embeddings to do semantic search, or that's what powers the search. But you can use embeddings for lots of other things, too. There are built-in functions for lots of major embedding providers. But I also want to point out you can provide your own embedding function. You're not gated by us implementing something. Once you've created your store, the next step is figure out what you want in that store. If you have a bunch of local files, you can just list them. If you want to scrape a website, you can use ragnar find links and you'll get a nice character vector of URLs. This function has a lot of bells and whistles. It'll like validate links and stuff.

And then once you have a list of all your documents, you're going to iterate through them one at a time and then for each one the first thing you're going to do is you're going to call read as markdown. So read as markdown is a very wide funnel. You can throw almost anything at it and you can get back something that looks like markdown. And markdown is a great format for LLMs in general. Once you have your piece of markdown text, you want to split it into smaller chunks or excerpts. And for this task, ragnar provides markdown chunk. And markdown chunks are basically just a bunch of text that you're going to put in a single file. And markdown chunk is quite a fancy function. I would describe it in a phrase as semantic boundary aware strided chunking. It tries to pick smart boundary positions so it doesn't cut off in the middle of a word, for example.

Markdown chunk returns a data frame of start and end positions as integers. It returns the text and then it has one other trick that it does. It generates a context column so for every chunk it also assembles all the markdown headings that are in scope for that chunk position. That really helps situate that excerpt for the LLM. Once you have your chunks, you insert them into the store. And then once you've done that for all your documents, you build your index. And now you're ready to search or hook up an LLM to do search.

There's a couple ways you can do search. The highest level is using the function RagnarRetrieve. You give it a query and you get back a data frame of the most relevant excerpts. Under the hood, RagnarRetrieve does a lot. It does semantic search using the embedding vectors. It also does keyword search. It deduplicates all those results and de-overlaps them. You can scope the search and so on. If RagnarRetrieve does too much or too little for you, there are some lower level building blocks you can use to do just semantic search or just keyword search. And then I want to point out that if those functions also aren't quite at the right level of abstraction, because this is a DuckDB store, you can write your own. You can do whatever you want.

And then once you have your store and you want to equip an LLM with the ability to search that store, it's two lines of code. Earlier, this is the code I used to generate the slop at the start of the talk. And this is what you need to equip that LLM with the ability to search a store. This register tool function has a lot of useful patterns baked into it. It lets the LLM perform query rewriting and it lets it do multiple searches. These are things that work great in practice. It tries to be context efficient. So it remembers what it already returned in this conversation and avoids returning the same result again. It deduplicates and de-overlaps the retrieved excerpts. It also presents a very simple interface to the LLM so it's hard for the LLM to call it wrong or make mistakes, which is something you can see if a tool has a lot of arguments. And it formats the results very thoughtfully to avoid or try to avoid confusing the LLM between what is text and what is user content and what is metadata, which comes into play when you're dumping a lot of retrieved results into context.

One thing that we noticed as we were building this is that it's too easy to never inspect your store. Like you have this big ingestion pipeline and you have these huge files. So we built an inspector where you can preview okay, what results are coming up with different search queries. At the top there you can choose your search method. And also if you want to preview oh, what happened? Preview different preview the chunks as either markdown or as raw text. There's another inspection tool that we added recently called the Store Atlas. And here you can have UMAP projections. And this is a great way to explore what is clustering together, which chunks are clustering together using my embedding function. You can click around. It's really quite a nice interactive tool.

If you want to learn more about ragnar, the first stop should be the documentation website, ragnar.tidyburst.org. I also want to give a shout out to Sharon Machlis who is right in the audience over here. She's written a great article which was published in InfoWorld showing how to use ragnar. And also put on a workshop for Ukraine. So thank you, Sharon.

There's an example application that I built at this URL called Quarto Help which lets you chat side by side while viewing the Quarto docs. And this I wrote thinking please fork this and then make a chat with docs for what's important to you. I picked Quarto just because it's the right size problem. But it's really to empower you and that's ragnar with ragnar. Thank you.

chatlas: a Python package for LLM interaction

Hello, everyone. I'm Carson. And I'm excited to show you a little demo of this Python package called chatlas today. So let me get this a little bit more readable. But if you were at the keynote yesterday afternoon you might have noticed Hadley gave a little bit of a call out to this Python package called chatlas. And mentioned it as being kind of the equivalent to Elmer but in Python. So both chatlas and Elmer are going to give you a very similar user experience and similar set of features. And kind of the first main important thing that they allow you to do is try lots of different models from lots of different providers and switch between them very seamlessly.

So kind of the getting started experience, kind of both in Elmer and chatlas, is you choose a model provider. So here I have some code to connect to OpenAI. But this could just as easily be Anthropic. Or Google. Or maybe an enterprise setting for accessing these models. Like AWS. Snowflake. Databricks. Azure. Lots of different environments in which you can connect to these models. And when you start a chat session, there's kind of two main pieces of input that you're going to want to provide. One is what sort of model do you want to use? One is what specific model are you trying to use from this provider? So here I'm choosing GPT 4.1 from OpenAI. One nice thing about chatlas in terms of an experience, some of these providers are actually going to provide type hints in terms of what models are available to you. So I don't know if you've ever done this before, but it's kind of a nightmare trying to figure out what is the right incantation for what model I'm trying to use. So that's one thing.

The second thing is the system prompt. So this is kind of the place for you as a developer to kind of customize the experience of the LLM behavior when it's responding to user input. So in a real situation, this might include some context about your domain setting, or just some general instructions or a role for the LLM to play during the conversation. So in reality, this might be kind of a big complex piece of file or information. For here, we're just going to keep it real simple and fun and just say, you are Zoidberg.

And one thing I can do straight away is drop straight into a Shiny chat web interface. This is really great for just kind of first exploring the capabilities of the model and getting a feel for what it's able to do. So I can treat this kind of how you would treat ChatGPT in a sense, where I can just start typing right away, teach me some Python, for example. And, you know, since this is interactive and web-based, there's some nice features that come with this in the sense of like you get a little icon that you can click to copy to the clipboard if there's some code output in the response. So that's great for a nice interactive experience where you don't have to really program to start interacting with a model.

But once you kind of go from that to actually trying to build something programmatically with the LLM, the first one you're probably going to want to reach for is this chat method. So I can submit some string input, and this is basically the same as submitting through the chat web interface. The main difference here is, you know, I'm going to be running this at the console on the lower left-hand side, and the nice thing about the chat method is it basically kind of assumes you're in an interactive setting, you're at the console, you're maybe in a Jupyter notebook, where it's convenient to have the streaming output displayed right there as you submit input to the LLM. So not only that, if the model responds with markdown syntax, then you're also going to get some nice formatting and syntax highlighting right there in the console as well.

Similar to what we saw with Databot, there is an ability to export the chat conversation to a standalone HTML file. So I already have one saved here. I think I actually have it in my browser as well. So you can just run that export method, save it to an HTML file, and you get a similar kind of style as what you get with the Shiny chat interface.

You can also submit things like images or PDFs with your chat input. So the main thing here is you're going to want to use one of the content helpers. You can attach images from URLs or local files. You can also attach PDF files. That won't work with, like, every model, but at least for models that support these kind of non-text inputs, you're able to use these content helpers. And here it's able to recognize, oh, this is actually an image of Bender. So that's great.

But an example of an LLM limitation. Again, this was kind of part of some of Hadley's points in the keynote, where LLMs have this important limitation of kind of a fixed cutoff date in terms of their knowledge set. So RAG is kind of one way to address this limitation in a sense. Where, well, first, if I first ask this question, it's going to say, basically, I don't know what the current weather is in Atlanta, Georgia. So RAG would be some way of kind of providing additional context to a model to answer questions that they don't have the knowledge for. Another way of addressing this problem is supplying tools to the LLM. And in this case, meaning, like, Python functions. And providing tools in chatlas is quite easy.

Kind of the base requirements here is you're going to want to probably use type annotations on the input parameters so that the model knows, like, what kind of input I'm allowed to provide as input values to this tool. As well as a doc string to just generally kind of tell the model, both the model and yourself, like, what is this function useful for. And also provides a kind of natural place to document parameters. So I'm going to just take this function and register it with my chat session. And then ask the same question again. And now we'll see in the output here some nice output suggesting that the LLM has made a tool request. And it's actually kind of inferred a latitude and distance for me based on the city location. That's just kind of some of the magic of the LLM. But it's making the request. And then the Python session and chatlas is handling the actual execution of that tool based on the request. Getting the tool result, passing that back to the LLM. And then it takes that information and generates a response for me based on that tool result.

Another big feature is the ability to force the model to give you structured output. Again, we saw an example of this in the keynote. But the Python way of doing this is to use the package. Where I'm going to subclass a base model. And in this case, I'm going to try to use this LLM to do, like, some sentiment analysis. So I'm going to define, like, three different fields. A positive score, a negative score, and a neutral score. Define this sentiment class. And then use this slightly different method, chat structured, of providing the sentiment class to kind of tell the LLM this is kind of the actual data that I'm trying to extract from the input. And then here is an example of some text that I want to extract a sentiment score from. So I run that, and I get a positive, negative, and neutral score on this text.

I'm probably running out of time. But I'll just mention there's one other method, a stream method, which is a little bit more programmatic interface. Allows you to basically kind of program with the streaming output as it comes in from the model. So this is just a real basic way to just kind of print out the input as they're coming in. But you can pretty easily integrate this with Shiny's chat UI component. So these couple lines here is setting up a Shiny chat interface, kind of similar to the one that you see in the window down here. And then once I have the front end piece, I need to kind of define the back end piece where I take user input from that chat component, send it to chatlas to get the streaming response, and then send that streaming response into the Shiny end. And, yeah, that's all I have. So thanks.

Q&A

So I'm going to try and do some rapid questions here from Slido before the stream goes dead in about three minutes. But one anonymous one was, if writing, and I think this is for you, George, if writing an academic research paper, is the assistant useful for content and writing, or is it strictly for code assistance?

So I guess there's two ways to look at this, right, what the models are capable of and sort of what we've built around that. Certainly the models will try to write prose, and they're getting pretty good at it, but it's not what we've designed assistant for. So these things will work, but you'll probably not get the best experience. We really designed the system to be for those coding problems, to have that tight loop of writing code and executing code in Positron itself. What I will say is if you're working with data, particularly in an academic context, definitely lean more towards Databot because we've added more affordances in the prompting and the design of that system. And I would also say sort of the longer you leave these models to just spin outputting text, the more off the rails they go. That's what I've generally found. So you want to try and keep a really tight sort of leash when you're generating sort of text. At least with code, right, you can run it and verify things a lot easier.

Will, I think this is for you, Winston, will Databot incorporate survey weights if told to? Will it incorporate survey weights? I don't know if that's a specific technique. I mean, it will do whatever you ask it to do as long as it is capable. It will try to write code for that. Does anyone know? It would try to. Okay.

One other Databot question. Are there ways of using Databot features programmatically like generating reports? There currently are not. It is, so programmatically I'm guessing from R or Python is the question. There's actually not much to it in Databot. It asks the LLM to do it and then provides the LLM with the tool to write to a file. So if you are interested in doing that, you can use chatlas or Elmer and give it a tool to write to a file and it will be able to do those things.

And one last question in Slido is, does ragnar support other vector stores other than DuckDB? Not yet. Thank you all who joined virtually. We're going to stick around for some questions in the room here but I know the stream is going to cut out. Thank you all.