
Switching from MySQL to PostgreSQL unlocked powerful features for a recent project, including robust JSON support with `jsonb` for indexing and querying, and built-in full-text search using `tsvector` and `tsquery`. Additionally, PostgreSQL’s pgvector enables seamless storage and similarity searches for AI embeddings, streamlining workflows without the need for extra infrastructure. For complex data applications, PostgreSQL emerges as the superior choice.

Working remotely with a team across China and Ireland taught me the value of asynchronous communication and the importance of clear writing. Daily standups, despite seeming redundant, are crucial for aligning on priorities, while improving my written English has minimized misunderstandings. This remote setup has transformed me into a more thoughtful engineer, enhancing my problem-solving and documentation skills.

Working remotely with a team across China and Ireland has honed my skills in asynchronous communication, where clarity and context in messages are essential for effective collaboration. Daily standups, though brief, synchronize project statuses and prevent misalignments, while improved written English enhances understanding. This experience has transformed my engineering approach, encouraging deeper problem-solving and better documentation practices.

After switching from MySQL to PostgreSQL for a project needing full-text search and JSON storage, the author found PostgreSQL's capabilities superior. PostgreSQL’s `jsonb` type allows for efficient indexing and querying, making complex data interactions seamless. The built-in full-text search with `tsvector` and `tsquery` provided adequate search functionality without external services. Additionally, the introduction of `pgvector` enables the storage of AI embeddings and similarity searches directly within the database, streamlining infrastructure. While MySQL remains effective for high-traffic read-heavy applications, PostgreSQL is recommended for new projects involving AI and complex data scenarios due to its robust feature set and future-proofing.

This blog post details the creation of a Retrieval-Augmented Generation (RAG) chatbot that answers questions using uploaded documents. The process begins with document uploads that are chunked and transformed into embeddings, which are stored in a PostgreSQL database. When a user asks a question, the system embeds the query, retrieves the most relevant document chunks through cosine similarity, and feeds this context to an OpenAI model to generate accurate responses. Key insights include the importance of optimizing chunk size for context retention and effective prompt design to enhance output reliability, ultimately leading to a chatbot capable of providing precise, document-based answers.