noellemitchell, to OpenAI
@noellemitchell@mstdn.social avatar

"Over the past few months, we’ve learned that Apple has been in discussions with both Google and OpenAI (which owns ChatGPT) about using their respective LLMs to power future features coming to iOS. Now, according to industry analyst Mark Gurman, Apple’s deal with OpenAI might be close to finalized."

Great...just what we need. More ChatGPT.

https://www.androidauthority.com/apple-chatgpt-ios-deal-3442079/

hypolite, to llm

Yay, I too got my 7-day suspension badge from Stack Overflow from adding an disclaimer back after it was first reverted to my four (4) answers!

That’s how it works, right?

kingu,
@kingu@mstdn.social avatar

@hypolite 😮

hypolite,

I've received a formal response by the Stack Overflow team, encouraging me to edit my profile to add any anti-AI statement I want. However, the 7-days ban means that I cannot perform this operation for a week. 🤡

They've also added, and I quote:

While we are working to get further clarity and better public messaging, it is our current understanding (based on this official statement from Stack Exchange) that these agreements with AI companies are a way to work with companies using Stack Exchange data to provide appropriate attribution (as per the CC by-SA license), rather than simply providing answers without attribution, as many do today.

I may have lost my temper and delivered them this response to this paragraph:

And I'm glad you unpaid clowns drank the AI Kool-Aid, it makes easier my decision to put Stack Overflow to the overflowing enshittification bin where it just rightfully earned its place.The sad truth is that LLM systems cannot provide appropriate attribution by design. These systems are meant to generate plausible looking texts with unreliable accuracy. This includes attribution that will also be plausible-looking once it goes through the data mixer.

Enjoy your joyless reverts and bans while you can, shills.

fabio, to llm
@fabio@manganiello.social avatar

A study that confirms what I’ve been suspecting for a while: fine-tuning a #LLM with new knowledge increases its tendency to hallucinate.

If the new knowledge wasn’t provided in the original training set, then the model has to shift its weights from their previous optimal state to a new state that has to accommodate both the previous and new knowledge - and it may not necessarily be optimal.

Without a new validation round against the whole previous cross-validation and test sets, that’s just likely to increase the chances for the model to go off the tangent.

#AI #ML @ai

https://arxiv.org/abs/2405.05904

kevinctofel, to til
@kevinctofel@hachyderm.io avatar

🆕 blog post: May 10, 2024 -

Personalizing my local , replacing paper towels, and the world's longest (unofficial) ski jump of 291 meters.

https://myconscious.stream/blog/May-10-2024-TIL

veronica, to stackoverflow
@veronica@mastodon.online avatar

Well, fuck you Stack Overflow. I deleted my answers and have now deleted all my accounts.

veronica,
@veronica@mastodon.online avatar

I'm just gonna stop contributing to anything. I'm so tired of this bullshit.

m0bi13, to ai Polish
@m0bi13@pol.social avatar

Właśnie odsłuchałem i Wam polecam. Świetna rozmowa o tym, czym "AI" (LLM) nie jest 😉

I że to nie "ona", a komputer potrafi źle policzyć, bo wykonuje (licząc) algorytm napisany przez człowieka.

https://panoptykon.org/sztuczna-inteligencja-ganzha-podcast

Na stronie link RSS do podkastu.

#AI #LLM #SztucznaInteligencja #Podcast #Podkast

piotrsikora,
@piotrsikora@pol.social avatar

@m0bi13 BTW, najlepsze modele LLM mają około 50% skuteczności w średnich zadaniach matematycznych… proste w około 80% a praktycznie 0 w trudnych ;)

To że chatGPT potrafi liczyć to po prostu wewnątrz są tzw function-calling… czyli model wie że jak zobaczy zadanie matematyczne to ma je wywxtraktowac i poprosić komputer o wykonanie tego zadania.

cigitalgem, to ai
@cigitalgem@sigmoid.social avatar

CalypsoAI produced a video for RSA abojut #MLsec #AI #ML #security #infosec #LLM

Watch as I interview Jim Routh and Neil Serebryany.

https://berryvilleiml.com/2024/05/10/video-interview-a-deep-dive-into-generative-ai-and-cybersecurity/

cigitalgem,
@cigitalgem@sigmoid.social avatar

Here is a direct YouTube link https://www.youtube.com/watch?v=9qQwU6iUsz0

boilingsteam, to gaming
@boilingsteam@mastodon.cloud avatar

Player-Driven Emergence in LLM-Driven Game Narrative: https://arxiv.org/abs/2404.17027 #gaming #llm #ai #model #narrrative

joe, to ai

A few weeks back, I thought about getting an AI model to return the “Flavor of the Day” for a Culver’s location. If you ask Llama 3:70b “The website https://www.culvers.com/restaurants/glendale-wi-bayside-dr lists “today’s flavor of the day”. What is today’s flavor of the day?”, it doesn’t give a helpful answer.

https://i0.wp.com/jws.news/wp-content/uploads/2024/05/Screenshot-2024-05-09-at-12.29.28%E2%80%AFPM.png?resize=1024%2C690&ssl=1

If you ask ChatGPT 4 the same question, it gives an even less useful answer.

https://i0.wp.com/jws.news/wp-content/uploads/2024/05/Screenshot-2024-05-09-at-12.33.42%E2%80%AFPM.png?resize=1024%2C782&ssl=1

If you check the website, today’s flavor of the day is Chocolate Caramel Twist.

https://i0.wp.com/jws.news/wp-content/uploads/2024/05/Screenshot-2024-05-09-at-12.41.21%E2%80%AFPM.png?resize=1024%2C657&ssl=1

So, how can we get a proper answer? Ten years ago, when I wrote “The Milwaukee Soup App”, I used the Kimono (which is long dead) to scrape the soup of the day. You could also write a fiddly script to scrape the value manually. It turns out that there is another option, though. You could use Scrapegraph-ai. ScrapeGraphAI is a web scraping Python library that uses LLM and direct graph logic to create scraping pipelines for websites, documents, and XML files. Just say which information you want to extract and the library will do it for you.

Let’s take a look at an example. The project has an official demo where you need to provide an OpenAI API key, select a model, provide a link to scrape, and write a prompt.

https://i0.wp.com/jws.news/wp-content/uploads/2024/05/Screenshot-2024-05-09-at-12.35.29%E2%80%AFPM.png?resize=1024%2C660&ssl=1

As you can see, it reliably gives you the flavor of the day (in a nice JSON object). It will go even further, though because if you point it at the monthly calendar, you can ask it for the flavor of the day and soup of the day for the remainder of the month and it can do that as well.

https://i0.wp.com/jws.news/wp-content/uploads/2024/05/Screenshot-2024-05-09-at-1.14.43%E2%80%AFPM.png?resize=1024%2C851&ssl=1

Running it locally with Llama 3 and Nomic

I am running Python 3.12 on my Mac but when you run pip install scrapegraphai to install the dependencies, it throws an error. The project lists the prerequisite of Python 3.8+, so I downloaded 3.9 and installed the library into a new virtual environment.

Let’s see what the code looks like.

You will notice that just like in yesterday’s How to build a RAG system post, we are using both a main model and an embedding model.

So, what does the output look like?

https://i0.wp.com/jws.news/wp-content/uploads/2024/05/Screenshot-2024-05-09-at-2.28.10%E2%80%AFPM.png?resize=1024%2C800&ssl=1

At this point, if you want to harvest flavors of the day for each location, you can do so pretty simply. You just need to loop through each of Culver’s location websites.

Have a question, comment, etc? Please feel free to drop a comment, below.

https://jws.news/2024/how-to-use-ai-to-make-web-scraping-easier/

stvfrnzl, to OpenAI
@stvfrnzl@mastodon.online avatar

Just got an e-mail from informing me that one of their sub-processors (whatever that means) is now .

I immediately asked them if the content I created will be used in any way to train their and if so, I want no part in it. Requested a back-up of my data and to delete everything.

I used it for the first iteration of my blog but switched to a while ago.

This is bullshit hype is SO annoying

TechDesk, to ai
@TechDesk@flipboard.social avatar

Stack Overflow, a popular forum for programmers and software developers, announced a partnership with OpenAI earlier this week, selling the site’s data, including users’ forum posts, to train ChatGPT.

Now unhappy users are finding themselves banned for editing their popular posts in protest, and even finding those posts changed back by admin – “a reminder that anything you post on any of these platforms can and will be used for profit,” concluded one. Futurism has more.

https://flip.it/IVR89a

crecente, to llm
@crecente@games.ngo avatar

Assume a website plans to use user-contribution content to train LLMs. The license for the content is CC BY-SA.

❓ Would the output from the resulting LLMs be required to provide attribution?

@law

1dalm,
@1dalm@deacon.social avatar

@crecente @law

Not likely in the US. I personally believe that it's unlikely any of the copyright claims against AI generators will stand.

If Google Books -a web site that literally copied full copyrighted works and allowed people to search through them and showed them actual images of the search results- was deemed to not be in violation of copyright law, then I just don't see how AI systems are going to be found in violation.

Ultimately, if just analyzing and learning from prior works and using that knowledge to create derivative works is copyright violation, then literally every single human that has ever drawn or written anything at all is also in violation.

twan,
@twan@mastodon.online avatar

@crecente @law That would depend on whether the output is considered to be a derivative, I guess? (Assuming it's not a quote.)

rpsu, to llm
@rpsu@mas.to avatar

I just found out one actually useful use case for #LLM (a.k.a. “AI”).

There is thousands of tonnes of documents from #german #nazi #regime detailing basically everything what happened, who was involved and who participated what and said what.

Feed ALL of that to an LLM and ask it “how can we avoid this happening ever again”. I have a pretty good guess my self but some people aren’t that convinced. Perhaps this is The Key.
#history #sciense #neverAgain

ramikrispin, to llm
@ramikrispin@mstdn.social avatar

(1/2) Prompt Fuzzer - a new open-source project for LLM security 👇🏼

Prompt Fuzzer is a new open-source project that provides a set of functions for assessing the security of GenAI applications. This CLI-based tool enables you to run and test your system prompts to identify security vulnerabilities against potential dynamic LLM-based attacks.

https://github.com/prompt-security/ps-fuzz

#llm #security #DataScience #opensource

ramikrispin,
@ramikrispin@mstdn.social avatar

(2/2) The CLI interface has an interactive playground chat interface, giving you the chance to iteratively improve your system prompt, hardening it against a wide spectrum of generative AI attacks

License: MIT 🦄

joe, (edited ) to ai

Back in January, we started looking at AI and how to run a large language model (LLM) locally (instead of just using something like ChatGPT or Gemini). A tool like Ollama is great for building a system that uses AI without dependence on OpenAI. Today, we will look at creating a Retrieval-augmented generation (RAG) application, using Python, LangChain, Chroma DB, and Ollama. Retrieval-augmented generation is the process of optimizing the output of a large language model, so it references an authoritative knowledge base outside of its training data sources before generating a response. If you have a source of truth that isn’t in the training data, it is a good way to get the model to know about it. Let’s get started!

Your RAG will need a model (like llama3 or mistral), an embedding model (like mxbai-embed-large), and a vector database. The vector database contains relevant documentation to help the model answer specific questions better. For this demo, our vector database is going to be Chroma DB. You will need to “chunk” the text you are feeding into the database. Let’s start there.

Chunking

There are many ways of choosing the right chunk size and overlap but for this demo, I am just going to use a chunk size of 7500 characters and an overlap of 100 characters. I am also going to use LangChain‘s CharacterTextSplitter to do the chunking. It means that the last 100 characters in the value will be duplicated in the next database record.

The Vector Database

A vector database is a type of database designed to store, manage, and manipulate vector embeddings. Vector embeddings are representations of data (such as text, images, or sounds) in a high-dimensional space, where each data item is represented as a dense vector of real numbers. When you query a vector database, your query is transformed into a vector of real numbers. The database then uses this vector to perform similarity searches.

https://i0.wp.com/jws.news/wp-content/uploads/2024/05/Screenshot-2024-05-08-at-2.36.49%E2%80%AFPM.png?resize=665%2C560&ssl=1

You can think of it as being like a two-dimensional chart with points on it. One of those points is your query. The rest are your database records. What are the points that are closest to the query point?

Embedding Model

To do this, you can’t just use an Ollama model. You need to also use an embedding model. There are three that are available to pull from the Ollama library as of the writing of this. For this demo, we are going to be using nomic-embed-text.

Main Model

Our main model for this demo is going to be phi3. It is a 3.8B parameters model that was trained by Microsoft.

LangChain

You will notice that today’s demo is heavily using LangChain. LangChain is an open-source framework designed for developing applications that use LLMs. It provides tools and structures that enhance the customization, accuracy, and relevance of the outputs produced by these models. Developers can leverage LangChain to create new prompt chains or modify existing ones. LangChain pretty much has APIs for everything that we need to do in this app.

The Actual App

Before we start, you are going to want to pip install tiktoken langchain langchain-community langchain-core. You are also going to want to ollama pull phi3 and ollama pull nomic-embed-text. This is going to be a CLI app. You can run it from the terminal like python3 app.py "<Question Here>".

You also need a sources.txt file containing the URLs of things that you want to have in your vector database.

So, what is happening here? Our app.py file is reading sources.txt to get a list of URLs for news stories from Tuesday’s Apple event. It then uses WebBaseLoader to download the pages behind those URLs, uses CharacterTextSplitter to chunk the data, and creates the vectorstore using Chroma. It then creates and invokes rag_chain.

Here is what the output looks like:

https://i0.wp.com/jws.news/wp-content/uploads/2024/05/Screenshot-2024-05-08-at-4.09.36%E2%80%AFPM.png?resize=1024%2C845&ssl=1

The May 7th event is too recent to be in the model’s training data. This makes sure that the model knows about it. You could also feed the model company policy documents, the rules to a board game, or your diary and it will magically know that information. Since you are running the model in Ollama, there is no risk of that information getting out, too. It is pretty awesome.

Have any questions, comments, etc? Feel free to drop a comment, below.

https://jws.news/2024/how-to-build-a-rag-system-using-python-ollama-langchain-and-chroma-db/

#AI #ChromaDB #Chunking #LangChain #LLM #Ollama #Python #RAG

  • All
  • Subscribed
  • Moderated
  • Favorites
  • anitta
  • ngwrru68w68
  • hgfsjryuu7
  • InstantRegret
  • Youngstown
  • rosin
  • slotface
  • everett
  • mdbf
  • ethstaker
  • kavyap
  • thenastyranch
  • DreamBathrooms
  • PowerRangers
  • Leos
  • magazineikmin
  • Durango
  • cubers
  • GTA5RPClips
  • cisconetworking
  • tacticalgear
  • osvaldo12
  • khanakhh
  • vwfavf
  • tester
  • modclub
  • normalnudes
  • provamag3
  • All magazines