from Hacker News

Show HN: Factual AI Q&A – Answers based on Huberman Lab transcripts

by rileyt on 12/17/22, 6:05 PM with 43 comments

This is a quick prototype I built for semantic search and factual question answering using embeddings and GPT-3.

It tries to solve the LLM hallucination issue by guiding it only to answer questions from the given context instead of making things up. If you ask something not covered in an episode, it should say that it doesn't know rather than providing a plausible, but potentially incorrect response.

It uses Whisper to transcribe, text-embedding-ada-002 to embed, Pinecone.io to search, and text-davinci-003 to generate the answer.

More examples and explanations here: https://twitter.com/rileytomasek/status/1603854647575384067

  • by jonathan-adly on 12/18/22, 4:02 AM

    I did the same for the FDA drug label database and 100% believe that this the future for search. Semantic search layer for context then the large language layer for human answers.

    Tip - you don’t actually need GPT-3 level embedding for a decent semantic search. Sentence transformers paired with one of their models is good enough.

    I like this: https://huggingface.co/sentence-transformers/multi-qa-MiniLM... - since it’s very light.

    Also, perhaps I am an idiot but I just used Postgres array field to store my embeddings array to keep things simple and free.

  • by arcturus17 on 12/17/22, 11:41 PM

    Holy f**ing s**t, this is amazing!

    The UX is gorgeous, simple and snappy. I remember a few of Huberman's podcasts so I typed a few questions and the answers were spot on.

    I'll be following you and your work, Riley.

  • by doo_daa on 12/18/22, 8:19 AM

    This is an amazing piece of work and as others have said, the site and the UI are perfect.

    On a side note, Huberman Labs bothers me. I was an avid listener to the early episodes. As I have ADHD, some of his explanations of the brain chemistry involved in attention and motivation were fascinating. But in one of the early-ish episodes he said some completely ridiculous about acupuncture (that it worked) that makes me think he has no real critical thinking skills.

    I hope anyone out there listening to him and thinking about applying any of the approaches he talks about just takes the time to see whether any other sources say they have real-world effects.

    To the credit of the author, this tool highlights the exact thing I'm talking about. Try searching for...

    "How does acupuncture work?"

    "Acupuncture involves taking needles and sometimes electricity and or heat as well and stimulating particular locations on the body. Through these maps of stimulation that have been developed over thousands of years, mostly in Asia, acupuncture can reduce inflammation in the body by stimulating the body in particular ways at particular sites on the body, liberating certain cells and molecules that enhance the function of the immune system and potentially can be used to combat different types of infection."

  • by twojacobtwo on 12/17/22, 8:49 PM

    This is excellent! I have only recently begun listening to Huberman Lab and my biggest issue has been that I usually don't have an opportunity to write down most of the suggestions while I'm listening.

    I've only done a single search with the tool so far, but it immediately returned the details that I was hoping for, along with context and other relevant mentions of the search terms.

    Thank you kindly for making and sharing this.

  • by abrichr on 12/17/22, 10:53 PM

    > What are the parts of the brain that become de-synchronized in the ADHD brain?

    >> The default mode network and the task networks become de-synchronized in the ADHD brain.

    > What are the three parts of the brain that become de-synchronized in the ADHD brain?

    >> The default mode network, the task networks, and the dopamine circuits.

    From https://youtu.be/hFL6qRIJZ_Y?t=1714:

    > An area called the dorsolateral prefrontal cortex ... the posterior cingulate cortex, and ... the lateral parietal lobe ... these are three brain areas that normally are synchronized in their activities ... that's how it is in a typical person. In a person with ADHD ... these brain areas are not playing well with each other.

    I wonder if part of the problem might be the usage of text to speech. Did you consider scraping the transcriptions instead? e.g. with https://github.com/jdepoix/youtube-transcript-api

  • by lr4444lr on 12/18/22, 2:33 AM

    I was just thinking the other day how I'd LOVE to have a way to get a summary of all of the experts' opinions Huberman has had opine on a given supplement. This goes beyond my expectations. Great work!
  • by lemming on 12/18/22, 4:45 AM

    This is great. Since I also found the discoverability of podcasts annoying, I wrote a tool to download the Huberman Lab transcripts and convert them to an ebook: https://github.com/cmf/huberman. They still take a while to read though!
  • by abhinavsharma on 12/18/22, 12:59 AM

    this is amazing, thank you for building this, i was literally in the process of doing this with the same stack but as a chat bot.

    would you be open sourcing soon? totally understand if you want to keep it private but if you are open sourcing there’s a few other podcasts i’m interested in running this on for myself, like some parenting ones.

  • by DeWilde on 12/18/22, 9:03 AM

    This is pretty amazing. Is this approach documented or explained anywhere?

    I have some ideas of my own that I would love to implement similarly to this and it would help to know how to get started.

  • by solardev on 12/19/22, 11:47 AM

    Sorry for the ignorant question, but who is Huberman Lab and why should we care? What drove you to make an AI interface for it?
  • by niemal_dev on 12/18/22, 9:13 AM

    This is so well done, thank you for your contribution. An open-source of the whole approach would be greatly appreciated as well!
  • by Ozzie_osman on 12/17/22, 9:56 PM

    Big fan of Huberman Labs. Excited to try this out!
  • by layer8 on 12/17/22, 11:29 PM

    Just a heads up that the styling and the JS doesn't work on Firefox.
  • by abrichr on 12/17/22, 10:57 PM

    Congratulations on launching! Can you please share your OpenAI API costs?
  • by yewenjie on 12/18/22, 1:37 AM

    Can one generate the answers using text-embedding-ada-002 as well?
  • by krashidov on 12/17/22, 11:00 PM

    This is a really amazing application of GPT. Did you fine tune a gpt3 model? If so, how did you implement its ability to say “I don’t know?”
  • by bilsbie on 12/18/22, 12:04 AM

    What do you mean by embedding?