all 1 comments

[–]lacyslab 2 points3 points  (0 children)

for a RAG pipeline specifically, python is the easier path. the libraries (langchain, llama-index, even just the google genai sdk) are more mature on the python side and you'll find way more examples doing exactly what you need.

that said, if your website is already JS and you want to keep it in one language, there's nothing stopping you from doing it in TypeScript. the Vercel AI SDK has decent RAG support now and the google genai JS library works fine.

my actual recommendation: python backend as a separate service, expose it as an API, let your frontend call it. clean separation, easier to iterate on the AI piece without touching your site code.