I'm creating a Knowledge Base in Bedrock based on English books and I'm trying to get my model to answer with precision the following question (using Claude 3 Haiku with Bedrock Agent here):
"Tell me about / Write down for me the Exercise 11 from Unit 7"
Based on the following Markdown document:
...
# GRAMMAR
## Past passive: Describing past actions and processes
Goya created many of his works at night, by the light of a hat that had candles on it.
Many of Goya’s works **were created** at night, by the light of a hat that had candles on it.
Painters explored many different styles.
Many different styles **were explored** by painters.
Artists usually made paint by mixing colors with oils.
Paint **was usually made** by mixing colors with oils.
---
## **Language - Unit 7 - Exercise 11 - Listen. Learn about portraits and the stories they tell. Then circle the verbs that you hear used in the past passive.**
### ID: Language_Unit7_Exercise11
| ask | capture | create | die | display | do | invent |
|-----|---------|--------|-----|---------|----|--------|
| make | pay | require | spend | take | use | work |
---
## **Language - Unit 7 - Exercise 12 - Work in pairs. Use the words to ask and answer questions in the past passive.**
### ID: Language_Unit7_Exercise12
1. Mona Lisa / paint / da Vinci
- **Who painted the Mona Lisa?**
- The Mona Lisa **was painted** by Leonardo da Vinci.
2. Flyer III / build / Wright brothers
3. early camera / invent / Daguerre
4. cave paintings / create / early humans
---
## **Language - Unit 7 - Exercise 13 - Work in pairs. Look at **Portrait of a Young Woman**. Then answer questions using the past passive.**
### ID: Language_Unit7_Exercise13
1. Who painted the portrait? ______________________________________
2. What was worn by the subject? ______________________________________
3. What do you think the subject was asked to do by the painter? ______________________________________
---


\n---\n ## **Language - Unit 7 - Exercise 14 - Learn new words. Listen to learn more about painting. Then listen and repeat.**
### ID: Language_Unit7_Exercise14

*A landscape painting shows a scene from nature.*

*Although their subjects are often simple, still-life paintings can be **masterpieces**.*

*Some portraits aren’t **realistic**. They’re **abstract**.*
## **Language - Unit 7 - Exercise 15 - Discuss in groups**
### ID: Language_Unit7_Exercise15
1. Do you prefer realistic or abstract paintings? Why?
2. Can landscapes and still-life paintings be abstract? Why or why not?
3. Discuss two works of art you consider masterpieces.
## **Language - Unit 7 - Exercise 16 - Work independently. Use the past passive to describe how you think one of the works of art on these pages was created. Write at least four sentences.**
### ID: Language_Unit7_Exercise16
______________________________________________________________________
______________________________________________________________________
______________________________________________________________________
______________________________________________________________________
\n---\n# BRINGING STORIES TO LIFE
Do you love playing video games with really cool graphics? Or watching action movies with amazing special effects? Thanks to advances in digital technology, modern animation can create detailed, lifelike images that move around the screen at incredible speeds. We experience animation in so many different forms, from the cartoons on our TVs to the emojis on our smartphones. But animation is nothing new. In fact, people have been trying to bring images to life for hundreds of years.
The earliest animation began in the seventeenth century with a device called the magic lantern. In the nineteenth century, other devices were developed that created movement when viewers spun them. By the turn of the
## 1650s
The magic lantern uses the light of a candle and painted pieces of glass to create moving images projected onto a wall. It becomes more sophisticated over time.
## 1832
The phenakistoscope is considered by many to have created the first true animation. To watch the animation, the viewer holds up a mirror and spins two illustrated disks. The spinning motion makes the illustrations seem to move.
## 1834
The zoetrope also uses a spinning motion to create animation. It quickly becomes more popular than the phenakistoscope because more than one person can watch at a time.
## 1891
*... more parts of document
*
I've tried to run this query with default chunking (300 chunk size / 20% overlap), custom chunk (900 chunk size / 20% overlap), hierarchical chunking (with 1500 for parent and 300 for child chunk with 60 overlap), semantic chunking (with default values) but nothing seems to work, the Agent always ask for more information about the exercise cause It couldn't find in the documents or sometimes it brings another exercise semantically similar. I've also tried to put in my LLM context the following structure but didn't got good results:
...
Knowledge Base Use:
- When asked about a certain Exercise, you should ask about the Unit and the Book of that exercise and then search for that exercise using the tag "# **Book {book_name} 0 Unit {unit_number} - Exercise {exercise_number}.
Example:
Student: "I need help with exercise 10 from unit 7 of CLIL book"
You: {search CLIL - Unit 7 - Exercise 10} "Okay, let's understand the question. What have you answered until now?"
...
What bothers me a little is that I've tried to run the same task using Claude 3 Haiku but with OpenAI Embeddings through LangChain ChromaDB and it retrieved the expected answers very well, although I'm working in an AWS project and need to develop the solution using BedRock Knowledge Bases.
Do you think about something I can do to sharpen my RAG?
Hi Vinicius, for optimizing your chunking and knowledge base creation, I recommend reviewing the AWS documentation. It offers detailed guidance that might help refine your strategy. I’ve had excellent results using Bedrock Titan Embeddings combined with pgVector and Claude, which you might find beneficial for your use case.