Friday, August 4, 2023

Show HN: Zep – pgvector-based memory store for LLM apps https://ift.tt/gXJoWT4

Show HN: Zep – pgvector-based memory store for LLM apps Hey HN - we launched Zep's document vector DB today. Zep is an open source memory store for LLM apps, and this builds on existing chat history memory persistence, embedding, and enrichment capabilities. Zep uses Postgres and pgvector for database operations and vector search. Vector search can be complicated on Postgres, with careful configuration required at both index creation and query time. We've focused on significantly improving this developer experience. Zep automatically selects index and query parameters for developers based on best practices and known heuristics. Vector database operations are exposed via a simple Python (and LangChain) API for working with document collections, documents, and search results. While we focus on LLM App use cases, you can turn any Postgres instance with pgvector into a vector database with great DX. Our launch announcement: https://ift.tt/P8mWFyY... -Daniel https://ift.tt/eCGZh5X August 3, 2023 at 11:47PM

Show HN: Create your first ZK-SNARK Contract with Mina Blockchain https://ift.tt/DvKlzC1

Show HN: Create your first ZK-SNARK Contract with Mina Blockchain https://ift.tt/hUkt3qE August 3, 2023 at 11:51PM

Thursday, August 3, 2023

Show HN: TripClub – Plan Travel with AI https://ift.tt/XVxrCTZ

Show HN: TripClub – Plan Travel with AI Hey HN! This is Will and Riley from TripClub ( https://tripclub.ai/ ). TripClub helps you plan and visualize your trips while giving you recommended itineraries to anywhere in the world based on your input. We began working on this when we couldn’t find a good solution to plan trips with friends, and found that most people we knew used something like google docs along with 24 tabs for researching places. Also, with the recent progress in generative AI, we found that we could now create detailed trips based on any input you’d like, and turn these into visually appealing itineraries. As you may have suspected, we primarily use openAI models for trip generation on the backend. We put the recommendations into an interactable map and itinerary. After creating a trip, you can add your friends so everyone can collaborate on editing the various places on your itinerary. Right now every aspect of the app is free and we hope to keep it that way. However we haven’t built in a source of revenue at the moment and are fully bootstrapped, so this could change (we plan to make revenue on hotel bookings in the future). We’re looking forward to hearing any of your comments, questions, and feedback! https://tripclub.ai/ August 3, 2023 at 09:06PM

Show HN: Learn languages through immersion with AI friends https://ift.tt/zvLXgP6

Show HN: Learn languages through immersion with AI friends https://ift.tt/QcHEa41 August 3, 2023 at 07:26PM

Show HN: Grammar Generator App for Llama.cpp https://ift.tt/qaEKoWy

Show HN: Grammar Generator App for Llama.cpp llama.cpp added context-free grammar guided generation functionality. It requires passing a file in a derivative of BNF notation, which gets messy very quickly for things like JSON. To improve the experience, we built a small compiler from TypeScript interfaces to the grammar file format and have it hosted in a little browser app. See more in discussion at https://ift.tt/caMeJgZ https://ift.tt/k9o2v6U August 3, 2023 at 02:09AM

Show HN: Using LLama2 to Correct OCR Errors https://ift.tt/TD6JP9L

Show HN: Using LLama2 to Correct OCR Errors I've been disappointed by the very poor quality of results that I generally get when trying to run OCR on older scanned documents, especially ones that are typewritten or otherwise have unusual or irregular typography. I recently had the idea of using Llama2 to use common sense reasoning and subject level expertise to correct transcription errors in a "smart" way-- basically doing what a human proofreader who is familiar with the topic might do. I came up with the linked script that takes a PDF as input, runs Tesseract on it to get an initial text extraction, and then feeds this sentence-by-sentence to Llama2, first to correct mistakes, and then again on the corrected text to format it as markdown where possible. This was surprisingly easier than I initially expected thanks to the very nice tooling now available in libraries such as llama-cpp-python, langchain, and pytesseract. But the big issue I was encountering was that Llama2 wasn't just correcting the text it was given-- it was also hallucinating a LOT of totally new sentences that didn't appear in the original text at all (some of these new sentences used words which never appeared elsewhere in the original text). I figured this would be pretty simple to filter out using fuzzy string matching-- basically check all the sentences in the LLM corrected text and filter out sentences that are very different from any sentences in the original OCRed text. To my surprise, this approach worked very poorly. In fact, lots of other similar tweaks, including using bag-of-words and the spacy NLP library in various ways (spacy worked very poorly in everything I tried). Finally I realized that I had a good solution staring me in the face: Llama2. I realized I could get sentence level vector embeddings straight from Llama2 using langchain. So I did that, getting embeddings for each sentence in the raw OCRed text and the LLM corrected text, and then computed the cosine similarity of each sentence in the LLM corrected text against all sentences in the raw OCRed text. If no sentences match in the raw OCRed text, then that sentence has a good chance of being hallucinated. In order to save the user from having to experiment with various thresholds, I saved the computed embeddings to an SQLite database so they only had to be computed once, and then tried several thresholds, comparing the length of the filtered LLM corrected text to the raw OCRed text; if things worked right, these texts should be roughly the same length. So as soon as the filtered length dips below the raw OCRed text length, it backtracks and uses the previous threshold as the final selected threshold. Anyway, if you have some very old scanned documents laying around, you might try them out and see how well it works for you. Do note that it's extremely slow, but you can leave it overnight and maybe the next day you'll have your finished text, which is better than nothing! I feel like this could be useful for sites like the Internet Archive-- I've found their OCR results to be extremely poor for older documents. I'm very open to any ideas or suggestions you might have. I threw this together in a couple days and know that it can certainly be improved in various ways. One idea that I thought might be fun would be to make this work with a Ray cluster, sending a different page of the document to each of the workers in the cluster to do it all at the same time. https://ift.tt/YxG6PAH August 3, 2023 at 01:23AM

150 Years Ago Today – The Cable Car is Born

150 Years Ago Today – The Cable Car is Born
By Kelley Trahan

August 2, 2023, marks the 150th anniversary of the world’s first successful cable railway, born right here in San Francisco. To celebrate the occasion, we bring you the story of Andrew Hallidie and the very first cable car company, the Clay Street Hill Railroad. 

Andrew Hallidie (1834-1900) was a pioneering inventor and entrepreneur who changed urban transportation. In 1852, at the age of 18, Hallidie emigrated with his father from the United Kingdom to San Francisco during the California Gold Rush. His father, an engineer and inventor, had a wire rope patent that played a crucial role in his son's future success.  

Black and white photo of Cable Car Inventor Andrew Hallidie.

Portrait of Andrew Smith Hallidie in 1890.

Inspired by his father's wire rope business, Hallidie developed a steel cable mineral mine hauling system in 1857. About a decade later, he designed a wire rope aerial tramway for transporting materials over mountainous terrain. Then, after a stint in bridge construction across California, he returned to San Francisco. 

Legend has it that the idea to build a cable car came to Hallidie one foggy, wet San Francisco evening in 1869 when he witnessed a tragic accident. A team of horses pulling a streetcar up a steep cobblestone hill slipped, causing the streetcar and horses to slide down the hill into a heap of wreckage. Drawing on his mining experience, Hallidie believed he could come up with a better way to transport people up and over San Francisco’s many hills.

Picture of an 19th Century bus ticket that says Clay Street Hill Railroad Co.

Transfer from the Clay Street Hill Railroad Company used until early 1875.

Hallidie chose Clay Street between Kearny and Jones as the first route and raised $118,000, including significant investments from the residents of Clay Street. With engineering design work by William Eppelsheimer, construction began in early 1873. By mid-summer, the double-track line, powerhouse, cable and cars were completed at a total cost of $85,150. The first test run took place in the pre-dawn hours of August 2, 1873, and proved to be a tremendous success. One month later, on September 1, 1873, the Clay Street Hill Railroad Company began regular passenger service with a fare of five cents.  

Black and white photo of two cable cars with people riding on the back and looking at the camera.

Clay St. Hill Railroad Co. Dummy 7 and Trailer on Clay and Jones Streets in 1873.

Hallidie's historic efforts not only revolutionized transportation but also yielded profitable returns for his investors. His invention provided a safe and efficient means of travel up and down the city's hills and spurred the expansion and development of San Francisco's neighborhoods and businesses. The Clay Street Hill Railroad marked the beginning of many cable car railways in San Francisco and around the world. Within just two decades, eight different companies operated cable cars on 54 miles of track around the city. 

Throughout his life, Hallidie remained active in various engineering ventures and played a vital role in founding the San Francisco Mechanics' Institute, promoting scientific and technological education. Hallidie Plaza, near the Powell and Market Street cable car turntable, and the Hallidie Building in the city's Financial District are named after him. 

Black and white photo of a ceremony at the bottom of an escalator with crowds watching a speaker.

Dedication Ceremony for Hallidie Plaza at Market and Powell Street on March 14, 1973

Although none of the original Clay Street Hill Railroad line remains today, its legacy lives on. Muni’s 1 California bus route traverses the same path over Nob Hill and two cable cars that once served the line survive to this day. An original 1870s grip car, number 8, is on display in the San Francisco Cable Car Museum, and “Big” Cable Car 19, one of the last cable cars to run on Clay Street, is back in limited service through the fall in honor of the 150th anniversary. 

Color photo of a cable car with people riding on board and a man giving it a push start.

150th Anniversary of the cable cars kickoff event with "Big 19,” on July 10, 2023

Celebrate the 150-year legacy by hopping on San Francisco’s iconic cable cars or catching a special anniversary event. Find more information at SFMTA.com/CableCars150 and https://sfcablecars.org



Published August 03, 2023 at 12:33AM
https://ift.tt/jScO4C8

Show HN: Core – open source memory graph for LLMs – shareable, user owned https://ift.tt/2eL9jK6

Show HN: Core – open source memory graph for LLMs – shareable, user owned I keep running in the same problem of each AI app “remembers” me i...