# How to configure the schema

**URL:** <https://forum.weaviate.io/t/how-to-configure-the-schema/21759>\
**Category:** Support\
**Tags:** python, technical\
**Created:** [August 2, 2025, 2:13pm UTC](https://forum.weaviate.io/t/how-to-configure-the-schema/21759 "2025-08-02T14:13:19Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Hamza\_Khan](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.weaviate.io/hamza_khan/32/5508_2.png) [@Hamza\_Khan](https://forum.weaviate.io/u/Hamza_Khan)\
**Post date:** [August 2, 2025, 2:13pm UTC](https://forum.weaviate.io/t/how-to-configure-the-schema/21759/1 "2025-08-02T14:13:20Z")

</div>

Hello,  
I have been trying to implement RAG with langchain, and use weaviate vector database as a place to store my embedded data.  
I am also using openai integration to create the embeddings.  
I am splitting my documents which are in the format of PDFs and MD files and splitting them into chunks, then I am trying to convert them into Embeddings using openai, and store them in my local instance of weaviate.  
But I am having problem storing them as embeddings into the database. How do I create the schema and store them in the database?  
can anyone help? I am using python v4 client

---

<div class="post-metadata">

**Author:** ![Shahin](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.weaviate.io/shahin/32/7944_2.png) [@Shahin](https://forum.weaviate.io/u/Shahin)\
**Post date:** [August 2, 2025, 10:07pm UTC](https://forum.weaviate.io/t/how-to-configure-the-schema/21759/2 "2025-08-02T22:07:31Z")

</div>

Hey @Hamza_Khan,

Welcome to our community — it’s lovely to have you here!

That’s a great use case, and we’re definitely here to help.

I recommend checking out our Academy:

> **[Academy - Home | Weaviate Documentation](https://docs.weaviate.io/academy)**
>
> We've built these courses to help you build amazing things with Weaviate, faster.

> **[Retrieval Augmented Generation | Weaviate](https://weaviate.io/rag)**
>
> Build secure, explainable generative AI applications

it has some great tutorials that are super easy to follow and will guide you step-by-step on how to implement with Weaviate.

Best regards,

Mohamed Shahin  
Weaviate Support Engineer  
(Ireland, UTC±00:00/+01:00)

---

<div class="post-metadata">

**Author:** ![Hamza\_Khan](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.weaviate.io/hamza_khan/32/5508_2.png) [@Hamza\_Khan](https://forum.weaviate.io/u/Hamza_Khan)\
**Post date:** [August 5, 2025, 2:26pm UTC](https://forum.weaviate.io/t/how-to-configure-the-schema/21759/3 "2025-08-05T14:26:02Z")

</div>

Hey, so instead of creating my own schema, i am using the one that is automatically created by langchain. The problem that I was facing with this was the fact that, i have different scripts, and in order to instantiate the db in those files, i had to declare db as global, and then import it as a python module, but that is a bad practice as it, reinitializes ingestion, and basically its not good on the long term, however I found out that while running WeaviateVectorStore.from\_documents, you can give the class a name using index\_name=” ”  
In order to instantiate this in other files/script, you can run:

db = WeaviateVectorStore(client = client, index\_name = " ", text\_key=“text”, embedding = embeddings) #in order to instantiate the db, we need to write it like this, otherwise it will not work.

the issue i was facing earlier when instantiating was the fact that the positional argument: text\_key = “ “, was wrong, and i had no ability to see what it is in the first place because langchain automatically creates a schema with some properties, I just tried this and it worked out
