# AI
## About
👉🏼 I've added a demo @ [/ai](/ai)
Semantic search is powerful and it's part of the reason I build and publish this Today I Learned section on my website. Semantic search is even more powerful when you add natural language processing trained on a large language model. I'm making this page for notes on building a personal AI Assistant.
I written several essays in the last couple years on using tools to organize my workflow and thinking 1,2. In the last six months I've written two on Artificial Intelligence 3,4. I now use several different AI assistants within my text editor for coding. The same way I've applied my code documentation to the rest of my life here, I'm starting to realize how helpful AI assistants can be. I think I'll need one to interact with my public documentation and a second for me to interact with my private information like my calendar, chats, and emails.
I've recently started learning how to create embeddings using vector databases which can be chained to existing LLMs. I've started some documentation using LangChain and OpenAi 5. Because the field is rapidly developing, I need a place to keep notes on it, so here we are.
## Log
- **23-07-14** - finally closed a set of tabs this morning I noted here. I'd been stuck working on for a while because I've had to focus on other work. Will come back to this in the coming months.
## ToDo
- fix all relative links so that result links work
- try alternative LLMs like Llama
- control the data training
- self host supabase or postgres for data
- sync the data with Github actions.
- combine my posts into a monorepo using markdown
- return to exporting my post into markdown or migrate
- iterative testing of various prompts
## Docs
- OpenAi [/docs/saas/openai](/docs/saas/openai)
- SupaBase [/docs/saas/supabase](/docs/saas/supabase)
- https://supabase.com/docs/guides/api
- https://gpt-index.readthedocs.io/en/latest/
## Stack
- React
- Next.js
- Supabase / PostGres PgVector
#### Context Injection
- Tokenization
- Stop-word removal
- Stemming / Lemmatization
- Vectorization
#### Preprocessing
#### Embeddings
#### Data Storage
#### Prompt Engineering
#### Fine Tuning vs. Semantic Search
## Repos
- PGVector https://github.com/pgvector/pgvector
- SupaBase https://github.com/supabase/supabase
- Docusaurus Integration https://github.com/facebook/docusaurus/discussions/8835
- MarkPrompt https://github.com/windhamdavid/markprompt
- https://github.com/windhamdavid/dw-markprompt
- Mendable https://supabase.com/customers/mendableai
- Llama Index https://github.com/jerryjliu/llama_index
- Llama Hub https://github.com/emptycrown/llama-hub
- Llama Index WordPress https://github.com/emptycrown/llama-hub/tree/main/loader_hub/wordpress
- Llama Index Git Repo https://llamahub.ai/l/github_repo
- Llama Index GPT Retrieval Plugin - https://llamahub.ai/l/chatgpt_plugin
## Resources
- ChatGPT for Supabase Docs - https://supabase.com/blog/chatgpt-supabase-docs
- How I Built Supabase’s OpenAI Doc Search - https://www.youtube.com/watch?v=Yhtjd7yGGGA
- Self-Host Supabase Edge Functions - https://supabase.com/blog/supabase-beta-update-april-2023
- Storing OpenAI embeddings in Postgres with pgvector - https://supabase.com/blog/openai-embeddings-postgres-vector
- Mendable switches from Pinecone to Supabase for vector embeddings - https://supabase.com/customers/mendableai
- Supabase Clippy: ChatGPT for Supabase Docs - https://supabase.com/blog/chatgpt-supabase-docs
- Supabase Vector Columns - https://supabase.com/docs/guides/ai/vector-columns
- $0 Embeddings (OpenAI vs. free & open source) - https://www.youtube.com/watch?v=QdDoFfkVkcw
- Thor Schaeff - Supabase bot Next.js, Langchain - https://www.youtube.com/watch?v=Tt45NrVIBn8
- Haystack 2023 - Roie Schwaber-Cohen: Better Semantic Search with Hybrid (Sparse-Dense) Search - https://www.youtube.com/watch?v=1a8bdIjjO1A
- Roie Schwaber-Cohen - _Vector Embeddings for Developers_ - https://www.pinecone.io/learn/vector-embeddings-for-developers/
- Simon Willison - Vector Embeddings - https://simonwillison.net/tags/embeddings/
- Roie Schwaber-Cohen Github - Ai bot - https://github.com/rschwabco/ai-chat-bot-vercel
## Commercial
- Mendable - https://www.mendable.ai
- MarkPrompt - https://markprompt.com
---
## References
1. _Slow Thinking_ - https://davidawindham.com/slow-thinking/
2. _A Second Brain_ - https://davidawindham.com/a-second-brain/
3. _Artificial Intelligence_ - https://davidawindham.com/artificial-intelligence/
4. _Artificial Intelligence (Part 2)_ - https://davidawindham.com/artificial-intelligence-2/
5. TIL SasS OpenAI - [/docs/saas/OpenAI](/docs/saas/openai)
6. MarkPrompt - [https://markprompt.com/docs#react](https://markprompt.com/docs#react)