The best Hacker News stories from Show from the past day

Go back

Latest posts:

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.<p>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).<p>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).<p>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.<p>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.<p>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.<p>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.

Show HN: Adapt framework – build privacy-by-design peer-to-peer applications

Show HN: Learn a language quickly by practising speaking with AI

Hi guys,<p>Hope everyone is well. This app was borne out of my own frustration. I thought that I was terrible at learning languages at school, since I didn't become conversational in French after 5 years of study. However, I later traveled with some French friends and, in just under 3 weeks, I was able to hold a reasonable conversation. I realized that there's no substitute for speaking to native speakers.<p>I tried to adopt this approach for other languages, but it's much harder to find people to practise with when you aren't travelling. I started using iTalki to meet people from different countries and chat to them. It quickly became very expensive and time-consuming to schedule the calls, so I gave up.<p>I made PrettyPolly so that anyone can easily practice speaking 26 languages orally. The app uses ChatGPT (amongst other tools) to allow you to practice speaking whenever you want. It also generates a fluency score for each conversation so that you have an objective way of tracking progress.<p>It's free to use (up to 15 conversations per month). I've found that using it once or twice per day is plenty, and you'll be amazed at how much you will pick up in a week. I've added some FAQs here in case useful - <a href="https://www.prettypolly.app/learn" rel="nofollow noreferrer">https://www.prettypolly.app/learn</a><p>Would really appreciate any feedback. Let me know if you have any questions, issues or suggestions.<p>Thanks, Chris

Show HN: Learn a language quickly by practising speaking with AI

Hi guys,<p>Hope everyone is well. This app was borne out of my own frustration. I thought that I was terrible at learning languages at school, since I didn't become conversational in French after 5 years of study. However, I later traveled with some French friends and, in just under 3 weeks, I was able to hold a reasonable conversation. I realized that there's no substitute for speaking to native speakers.<p>I tried to adopt this approach for other languages, but it's much harder to find people to practise with when you aren't travelling. I started using iTalki to meet people from different countries and chat to them. It quickly became very expensive and time-consuming to schedule the calls, so I gave up.<p>I made PrettyPolly so that anyone can easily practice speaking 26 languages orally. The app uses ChatGPT (amongst other tools) to allow you to practice speaking whenever you want. It also generates a fluency score for each conversation so that you have an objective way of tracking progress.<p>It's free to use (up to 15 conversations per month). I've found that using it once or twice per day is plenty, and you'll be amazed at how much you will pick up in a week. I've added some FAQs here in case useful - <a href="https://www.prettypolly.app/learn" rel="nofollow noreferrer">https://www.prettypolly.app/learn</a><p>Would really appreciate any feedback. Let me know if you have any questions, issues or suggestions.<p>Thanks, Chris

Show HN: Learn a language quickly by practising speaking with AI

Hi guys,<p>Hope everyone is well. This app was borne out of my own frustration. I thought that I was terrible at learning languages at school, since I didn't become conversational in French after 5 years of study. However, I later traveled with some French friends and, in just under 3 weeks, I was able to hold a reasonable conversation. I realized that there's no substitute for speaking to native speakers.<p>I tried to adopt this approach for other languages, but it's much harder to find people to practise with when you aren't travelling. I started using iTalki to meet people from different countries and chat to them. It quickly became very expensive and time-consuming to schedule the calls, so I gave up.<p>I made PrettyPolly so that anyone can easily practice speaking 26 languages orally. The app uses ChatGPT (amongst other tools) to allow you to practice speaking whenever you want. It also generates a fluency score for each conversation so that you have an objective way of tracking progress.<p>It's free to use (up to 15 conversations per month). I've found that using it once or twice per day is plenty, and you'll be amazed at how much you will pick up in a week. I've added some FAQs here in case useful - <a href="https://www.prettypolly.app/learn" rel="nofollow noreferrer">https://www.prettypolly.app/learn</a><p>Would really appreciate any feedback. Let me know if you have any questions, issues or suggestions.<p>Thanks, Chris

Show HN: Local development with .local domains and HTTPS

Hi HN! I'm Jarek, and I've built this tool that allows publishing .local domains on the local network using mDNS.<p>It also has a reverse proxy that handles HTTPS termination and port forwarding.<p>I'm working on adding more features, like an index page with all available domains or allowing proxy redirects, so you could redirect from HTTP to HTTPS.<p>Let me know if you have any questions or feedback!

Show HN: imessage-exporter, a CLI app and library

Show HN: imessage-exporter, a CLI app and library

Show HN: imessage-exporter, a CLI app and library

Show HN: PromptTools – open-source tools for evaluating LLMs and vector DBs

Hey HN! We’re Kevin and Steve. We’re building PromptTools (<a href="https://github.com/hegelai/prompttools">https://github.com/hegelai/prompttools</a>): open-source, self-hostable tools for experimenting with, testing, and evaluating LLMs, vector databases, and prompts.<p>Evaluating prompts, LLMs, and vector databases is a painful, time-consuming but necessary part of the product engineering process. Our tools allow engineers to do this in a lot less time.<p>By “evaluating” we mean checking the quality of a model's response for a given use case, which is a combination of testing and benchmarking. As examples: - For generated JSON, SQL, or Python, you can check that the output is actually JSON, SQL, or executable Python. - For generated emails, you can use another model to assess the quality of the generated email given some requirements, like whether or not the email is written professionally. - For a question-answering chatbot, you can check that the actual answer is semantically similar to an expected answer.<p>At Google, Steve worked with HuggingFace and Lightning to support running the newest open-source models on TPUs. He realized that while the open-source community was contributing incredibly powerful models, it wasn’t so easy to discover and evaluate them. It wasn’t clear when you could use Llama or Falcon instead of GPT-4. We began looking for ways to simplify and scale this evaluation process.<p>With PromptTools, you can write a short Python script (as short as 5 lines) to run such checks across models, parameters, and prompts, and pass the results into an evaluation function to get scores. All these can be executed on your local machine without sending data to third-parties. Then we help you turn those experiments into unit tests and CI/CD that track your model’s performance over time.<p>Today we support all of the major model providers like OpenAI, Anthropic, Google, HuggingFace, and even LlamaCpp, and vector databases like ChromaDB and Weaviate. You can evaluate responses via semantic similarity, auto-evaluation by a language model, or structured output validations like JSON and Python. We even have a notebook UI for recording manual feedback.<p>Quickstart:<p><pre><code> pip install prompttools git clone https://github.com/hegelai/prompttools.git cd prompttools && jupyter notebook examples/notebooks/OpenAIChatExperiment.ipynb </code></pre> For detailed instructions, see our documentation at <a href="https://prompttools.readthedocs.io/en/latest/" rel="nofollow noreferrer">https://prompttools.readthedocs.io/en/latest/</a>.<p>We also have a playground UI, built in streamlit, which is currently in beta: <a href="https://github.com/hegelai/prompttools/tree/main/prompttools/playground">https://github.com/hegelai/prompttools/tree/main/prompttools...</a>. Launch it with:<p><pre><code> pip install prompttools git clone https://github.com/hegelai/prompttools.git cd prompttools && streamlit run prompttools/ui/playground.py </code></pre> We’d love it if you tried our product out and let us know what you think! We just got started a month ago and we’re eager to get feedback and keep building.

Show HN: PromptTools – open-source tools for evaluating LLMs and vector DBs

Hey HN! We’re Kevin and Steve. We’re building PromptTools (<a href="https://github.com/hegelai/prompttools">https://github.com/hegelai/prompttools</a>): open-source, self-hostable tools for experimenting with, testing, and evaluating LLMs, vector databases, and prompts.<p>Evaluating prompts, LLMs, and vector databases is a painful, time-consuming but necessary part of the product engineering process. Our tools allow engineers to do this in a lot less time.<p>By “evaluating” we mean checking the quality of a model's response for a given use case, which is a combination of testing and benchmarking. As examples: - For generated JSON, SQL, or Python, you can check that the output is actually JSON, SQL, or executable Python. - For generated emails, you can use another model to assess the quality of the generated email given some requirements, like whether or not the email is written professionally. - For a question-answering chatbot, you can check that the actual answer is semantically similar to an expected answer.<p>At Google, Steve worked with HuggingFace and Lightning to support running the newest open-source models on TPUs. He realized that while the open-source community was contributing incredibly powerful models, it wasn’t so easy to discover and evaluate them. It wasn’t clear when you could use Llama or Falcon instead of GPT-4. We began looking for ways to simplify and scale this evaluation process.<p>With PromptTools, you can write a short Python script (as short as 5 lines) to run such checks across models, parameters, and prompts, and pass the results into an evaluation function to get scores. All these can be executed on your local machine without sending data to third-parties. Then we help you turn those experiments into unit tests and CI/CD that track your model’s performance over time.<p>Today we support all of the major model providers like OpenAI, Anthropic, Google, HuggingFace, and even LlamaCpp, and vector databases like ChromaDB and Weaviate. You can evaluate responses via semantic similarity, auto-evaluation by a language model, or structured output validations like JSON and Python. We even have a notebook UI for recording manual feedback.<p>Quickstart:<p><pre><code> pip install prompttools git clone https://github.com/hegelai/prompttools.git cd prompttools && jupyter notebook examples/notebooks/OpenAIChatExperiment.ipynb </code></pre> For detailed instructions, see our documentation at <a href="https://prompttools.readthedocs.io/en/latest/" rel="nofollow noreferrer">https://prompttools.readthedocs.io/en/latest/</a>.<p>We also have a playground UI, built in streamlit, which is currently in beta: <a href="https://github.com/hegelai/prompttools/tree/main/prompttools/playground">https://github.com/hegelai/prompttools/tree/main/prompttools...</a>. Launch it with:<p><pre><code> pip install prompttools git clone https://github.com/hegelai/prompttools.git cd prompttools && streamlit run prompttools/ui/playground.py </code></pre> We’d love it if you tried our product out and let us know what you think! We just got started a month ago and we’re eager to get feedback and keep building.

Show HN: PromptTools – open-source tools for evaluating LLMs and vector DBs

Hey HN! We’re Kevin and Steve. We’re building PromptTools (<a href="https://github.com/hegelai/prompttools">https://github.com/hegelai/prompttools</a>): open-source, self-hostable tools for experimenting with, testing, and evaluating LLMs, vector databases, and prompts.<p>Evaluating prompts, LLMs, and vector databases is a painful, time-consuming but necessary part of the product engineering process. Our tools allow engineers to do this in a lot less time.<p>By “evaluating” we mean checking the quality of a model's response for a given use case, which is a combination of testing and benchmarking. As examples: - For generated JSON, SQL, or Python, you can check that the output is actually JSON, SQL, or executable Python. - For generated emails, you can use another model to assess the quality of the generated email given some requirements, like whether or not the email is written professionally. - For a question-answering chatbot, you can check that the actual answer is semantically similar to an expected answer.<p>At Google, Steve worked with HuggingFace and Lightning to support running the newest open-source models on TPUs. He realized that while the open-source community was contributing incredibly powerful models, it wasn’t so easy to discover and evaluate them. It wasn’t clear when you could use Llama or Falcon instead of GPT-4. We began looking for ways to simplify and scale this evaluation process.<p>With PromptTools, you can write a short Python script (as short as 5 lines) to run such checks across models, parameters, and prompts, and pass the results into an evaluation function to get scores. All these can be executed on your local machine without sending data to third-parties. Then we help you turn those experiments into unit tests and CI/CD that track your model’s performance over time.<p>Today we support all of the major model providers like OpenAI, Anthropic, Google, HuggingFace, and even LlamaCpp, and vector databases like ChromaDB and Weaviate. You can evaluate responses via semantic similarity, auto-evaluation by a language model, or structured output validations like JSON and Python. We even have a notebook UI for recording manual feedback.<p>Quickstart:<p><pre><code> pip install prompttools git clone https://github.com/hegelai/prompttools.git cd prompttools && jupyter notebook examples/notebooks/OpenAIChatExperiment.ipynb </code></pre> For detailed instructions, see our documentation at <a href="https://prompttools.readthedocs.io/en/latest/" rel="nofollow noreferrer">https://prompttools.readthedocs.io/en/latest/</a>.<p>We also have a playground UI, built in streamlit, which is currently in beta: <a href="https://github.com/hegelai/prompttools/tree/main/prompttools/playground">https://github.com/hegelai/prompttools/tree/main/prompttools...</a>. Launch it with:<p><pre><code> pip install prompttools git clone https://github.com/hegelai/prompttools.git cd prompttools && streamlit run prompttools/ui/playground.py </code></pre> We’d love it if you tried our product out and let us know what you think! We just got started a month ago and we’re eager to get feedback and keep building.

Show HN: Magic Loops – Combine LLMs and code to create simple automations

Howdy! We built this as an experiment in personal-programming, combining the best of LLMs and code to help automate tasks around you. I personally use it to track the tides and get notified when certain conditions are met, something that pure LLMs had trouble dealing with and pure code was often too brittle for.<p>We created it after getting frustrated with the inability of LLMs to deal with numbers and the various hoops we had to jump through to make ChatGPT output repeatable.<p>At the core, Magic Loops are just a series of "blocks" (JSON) that can be triggered with different inputs (email, time, webhook), then operate on those inputs using a combination of LLMs and code, and then output those results (email, text, webhook). Under the hood, the LLM calls are using GPT-4 via OpenAI and the code is run in sandboxed (no internet) Docker containers in AWS.<p>You have full control over each step of the loop, but you can also create (or attempt to create) a Magic Loop by simply describing what you want. We use GPT-4 to break that request into feasible steps, and then create a Magic Loop scaffold. Of course, you should still validate the loop before publishing it!<p>We've seen some neat use cases already:<p>- "Text me when the tide is less than 1ft between 7am and 7pm at Fort Funston"<p>- "Summarize an email using this format and forward it to this address"<p>- "Text me every time our store does more than $1000/day in volume on Shopify"<p>- "Take specific data from Cloudflare, format it, and send it to Mixpanel every hour"<p>We hope you enjoy what's essentially an experiment at this point. If folks like the concept, we're thinking about open sourcing it so you can run the loops locally with the code runtimes you wish (rather than in our code runners).<p>Let us know what you think, and more importantly, what you wish to build or automate!<p>Cheers, Adam & Mihai

Show HN: Magic Loops – Combine LLMs and code to create simple automations

Howdy! We built this as an experiment in personal-programming, combining the best of LLMs and code to help automate tasks around you. I personally use it to track the tides and get notified when certain conditions are met, something that pure LLMs had trouble dealing with and pure code was often too brittle for.<p>We created it after getting frustrated with the inability of LLMs to deal with numbers and the various hoops we had to jump through to make ChatGPT output repeatable.<p>At the core, Magic Loops are just a series of "blocks" (JSON) that can be triggered with different inputs (email, time, webhook), then operate on those inputs using a combination of LLMs and code, and then output those results (email, text, webhook). Under the hood, the LLM calls are using GPT-4 via OpenAI and the code is run in sandboxed (no internet) Docker containers in AWS.<p>You have full control over each step of the loop, but you can also create (or attempt to create) a Magic Loop by simply describing what you want. We use GPT-4 to break that request into feasible steps, and then create a Magic Loop scaffold. Of course, you should still validate the loop before publishing it!<p>We've seen some neat use cases already:<p>- "Text me when the tide is less than 1ft between 7am and 7pm at Fort Funston"<p>- "Summarize an email using this format and forward it to this address"<p>- "Text me every time our store does more than $1000/day in volume on Shopify"<p>- "Take specific data from Cloudflare, format it, and send it to Mixpanel every hour"<p>We hope you enjoy what's essentially an experiment at this point. If folks like the concept, we're thinking about open sourcing it so you can run the loops locally with the code runtimes you wish (rather than in our code runners).<p>Let us know what you think, and more importantly, what you wish to build or automate!<p>Cheers, Adam & Mihai

Show HN: Magic Loops – Combine LLMs and code to create simple automations

Howdy! We built this as an experiment in personal-programming, combining the best of LLMs and code to help automate tasks around you. I personally use it to track the tides and get notified when certain conditions are met, something that pure LLMs had trouble dealing with and pure code was often too brittle for.<p>We created it after getting frustrated with the inability of LLMs to deal with numbers and the various hoops we had to jump through to make ChatGPT output repeatable.<p>At the core, Magic Loops are just a series of "blocks" (JSON) that can be triggered with different inputs (email, time, webhook), then operate on those inputs using a combination of LLMs and code, and then output those results (email, text, webhook). Under the hood, the LLM calls are using GPT-4 via OpenAI and the code is run in sandboxed (no internet) Docker containers in AWS.<p>You have full control over each step of the loop, but you can also create (or attempt to create) a Magic Loop by simply describing what you want. We use GPT-4 to break that request into feasible steps, and then create a Magic Loop scaffold. Of course, you should still validate the loop before publishing it!<p>We've seen some neat use cases already:<p>- "Text me when the tide is less than 1ft between 7am and 7pm at Fort Funston"<p>- "Summarize an email using this format and forward it to this address"<p>- "Text me every time our store does more than $1000/day in volume on Shopify"<p>- "Take specific data from Cloudflare, format it, and send it to Mixpanel every hour"<p>We hope you enjoy what's essentially an experiment at this point. If folks like the concept, we're thinking about open sourcing it so you can run the loops locally with the code runtimes you wish (rather than in our code runners).<p>Let us know what you think, and more importantly, what you wish to build or automate!<p>Cheers, Adam & Mihai

Show HN: Magic Loops – Combine LLMs and code to create simple automations

Howdy! We built this as an experiment in personal-programming, combining the best of LLMs and code to help automate tasks around you. I personally use it to track the tides and get notified when certain conditions are met, something that pure LLMs had trouble dealing with and pure code was often too brittle for.<p>We created it after getting frustrated with the inability of LLMs to deal with numbers and the various hoops we had to jump through to make ChatGPT output repeatable.<p>At the core, Magic Loops are just a series of "blocks" (JSON) that can be triggered with different inputs (email, time, webhook), then operate on those inputs using a combination of LLMs and code, and then output those results (email, text, webhook). Under the hood, the LLM calls are using GPT-4 via OpenAI and the code is run in sandboxed (no internet) Docker containers in AWS.<p>You have full control over each step of the loop, but you can also create (or attempt to create) a Magic Loop by simply describing what you want. We use GPT-4 to break that request into feasible steps, and then create a Magic Loop scaffold. Of course, you should still validate the loop before publishing it!<p>We've seen some neat use cases already:<p>- "Text me when the tide is less than 1ft between 7am and 7pm at Fort Funston"<p>- "Summarize an email using this format and forward it to this address"<p>- "Text me every time our store does more than $1000/day in volume on Shopify"<p>- "Take specific data from Cloudflare, format it, and send it to Mixpanel every hour"<p>We hope you enjoy what's essentially an experiment at this point. If folks like the concept, we're thinking about open sourcing it so you can run the loops locally with the code runtimes you wish (rather than in our code runners).<p>Let us know what you think, and more importantly, what you wish to build or automate!<p>Cheers, Adam & Mihai

Show HN: File distribution over DNS: (ab)using DNS as a CDN

Show HN: File distribution over DNS: (ab)using DNS as a CDN

Show HN: File distribution over DNS: (ab)using DNS as a CDN

Show HN: A Notion-like platform for building interactive models

Hey HN. I wanted to share an update to our previous thread, “Notion with problem solving capabilities”.<p>The Decipad public beta is now live. You can try it for free here. <a href="https://www.decipad.com/" rel="nofollow noreferrer">https://www.decipad.com/</a><p>We started building Decipad to make numbers more expressive and playful. It’s a notebook environment where you can combine text, numbers, data and calculations into a story.<p>Our goal is to help people communicate with numbers more effectively and collaborate across diverse backgrounds. It’s feels a bit like Notion, but it’s for building interactive models and reports.<p>A few things we’ve been addressing building Decipad…<p>- A friendly modelling experience: You can express variables and calculations with quasi-natural language and connect them with tables, charts, pivot tables and other widgets.<p>- Unit expression: we built Decipad on a powerful unit system. You can assign labels and units to your data, like, `Cost = $5 per month per seat.`<p>- Dimensional Categories: Expressing relationships between variables and categories, making a model easy to adapt. We wrote about it here: <a href="https://www.decipad.com/blog/breaking-the-grid-overcoming-dimensional-constraints-in-spreadsheets" rel="nofollow noreferrer">https://www.decipad.com/blog/breaking-the-grid-overcoming-di...</a><p>- Connecting Data: Ability to connect data sources directly to your notebook. Right now, it’s intended for technical users. You can use JS and SQL to run a query.<p>We’re still exploring several areas like support for large data sets and building more UX interactions on top of our language to make modeling even more approachable and collaborative.<p>We would love to get feedback or any thoughts on our approach.

< 1 2 3 ... 372 373 374 375 376 ... 854 855 856 >