- Newest
- Most votes
- Most comments
The issue was in the #include headers in each _cpp.txt file. Once we cleaned out all rows starting with #include, the Knowledge Base successfully processed all files into the vector db Collection on OpenSearch Serverless.
Hi,
This is not really an answer to your question but I can confirm that Knowledge Bases accept source code from other programming languages.
For example, I made successful trials with Python code. Here my article with Python source code (django on Github): https://repost.aws/articles/AR-LV1HoR_S0m-qy89wXwHmw/the-leverage-of-llm-system-prompt-by-knowledge-bases-for-bedrock-in-rag-workflows
Can you also try with some other source code : Java, Python to see if it is really specific to C++ ?
Best.
Didier
Hi, this may also not directly the answer to your question, but I wanted to make sure you had looked at Amazon Q Developer as an alternative to Bedrock Knowledge Bases as this service optimized to help with coding development:
https://aws.amazon.com/q/developer/C
C++ is one of the supported languages: https://docs.aws.amazon.com/amazonq/latest/qdeveloper-ug/q-language-ide-support.html
Relevant content
- asked 6 months ago

renamed python files - filename.py -> filename.py.txt - seem to process as expected. As well as non-renamed .py and .h files - they both process successfully. What is it about C++ .cpp files; they're also just plain text files like the other files.