#62 From Endings to Beginnings: Exploring Generative AI's Literary Prowess
In this article, we're taking a well-deserved break from the tech-heavy content we've been immersed in lately. Instead, let's dive headfirst into the world of fiction, specifically romance novels. Who knows what surprises await us along the way :) ?
The "It Ends With Us" Series by Colleen Hoover
Renowned author Colleen Hoover has released two captivating books: "It Ends with Us" published in February 2016, and its sequel, "It Starts with Us," published in October 2022. Let's use these books as basis to embark on a captivating journey into the realm of romance!
"It Ends with Us" follows the story of Lily Bloom, a young woman who falls in love with Ryle Kincaid, a neurosurgeon. However, Lily soon discovers that Ryle has a dark past and is capable of violence. Lily must decide whether to stay with Ryle or leave him to find a healthier relationship.
"It Starts with Us" is the sequel to "It Ends with Us." It follows the story of Lily Bloom and Atlas Corrigan, who are now in a relationship. Lily is still struggling with the trauma of her past relationship with Ryle, but she is determined to build a happy future with Atlas.
The ChatGPT Challenge: Romance Novel Edition
Now that we've set the stage with our captivating romance novels, let's add a fun twist to our adventure. We're going to challenge our AI companion, ChatGPT, to engage with the content of both books and answer questions about them. As we dive into this literary experiment, we'll explore the intriguing world of encoders, decoders, vector databases, and semantic similarity. So, buckle up and join us for this unique exploration of AI and romance novels coming together!
An intriguing facet of this literary experiment lies in the fact that "It Starts with Us," published in 2022, remains unread by ChatGPT. However, our trusty AI companion has indeed delved into the first novel, "It Ends with Us."
Understanding Encoders and Decoders: The Language Bridge
In a previous article, we delved into the fascinating concept of mathematics as the universal language bridging the communication gap between humans and generative agents. Just as language interpreters facilitate understanding between heads of states, we require similar mediators to connect humans and generative agents. These indispensable components are known as encoders and decoders.
Encoders and decoders skillfully transform text content (broken down into manageable pieces or chunks) into vector space representations, commonly referred to as vector embeddings. The encoder masterfully translates text into these vector embeddings, while the decoder gracefully converts vector embeddings back into text. This intricate process enables AI to comprehend and process information, proving invaluable when faced with the challenge of answering questions about previously unencountered content.
领英推荐
Asking Questions: Engaging with ChatGPT
To inquire about "It Ends with Us," imagine posing a question to ChatGPT such as, “Who was the antagonist in the novel?” First, the encoder converts the question into an embedding. Following the generation of an answer, the decoder translates the resulting embedding back into natural language text. This process enables ChatGPT to supply accurate and pertinent information about the first novel.
A Different Approach: Vector Databases & Semantic Similarity
Step 1: Storing Embeddings Externally
Addressing "It Starts with Us" requires a distinct strategy since GPT has not read the book. Rather than incorporating the context of this content directly into the model, a more effective method is to store it as embeddings outside the model using vector databases. These databases enable the logical partitioning of the book into manageable chunks, such as its 23 chapters, facilitating efficient storage and accessibility.
Step 2: Presenting Context with the Question
When posing a question about the new book, it's crucial to present the context alongside the question. Semantic similarity plays a vital role in identifying relevant vectors. Vector databases and their associated frameworks can index embeddings based on their semantic similarity, allowing for the efficient identification of related vectors.
Step 3: Leveraging Semantic Similarity for Accurate Responses
Once the related vectors have been identified, they are presented to the language model. This approach enables the model to effectively answer questions about the previously unexplored book, even without prior knowledge of its content. By leveraging semantic similarity, ChatGPT can make meaningful connections between the query and the context, resulting in more accurate and relevant responses.
Wrapping-up
In conclusion, our journey into the world of romance novels not only provided a refreshing break from tech-heavy content but also showcased ChatGPT's versatility in addressing questions related to both familiar and unfamiliar literary works. By employing encoders, decoders, vector databases, and semantic similarity, we demonstrated the potential for AI to effectively process and understand information, even when venturing into previously uncharted territory. As the capabilities of AI continue to evolve, the applications and possibilities for such technology are bound to expand in exciting and innovative ways.
Yes, very intriguing. So… while utilizing external DB for embedding and providing context along with the pair of novels' semantic similarities, does ChatGPT give us the antagonist in "It Starts with Us" ?
That's really interesting! Thanks!