avatarYogesh Haribhau Kulkarni (PhD)

Free AI web copilot to create summaries, insights and extended knowledge, download it at here

1146

Abstract

9d13">As the thing in itself cannot be known, we are left with patterns of rationality as the only relevant reality (idealism). These patterns of intelligibility structure reality, and like living things they can develop towards more rational states. The name for this kind of extended mind in German is <b>Geist</b>, meaning a combination of mind and spirit.</p><p id="8020">The development of Geist is driven by two processes: <b>differentiation / articulation</b>, and <b>integration</b>. Together, they comprise the <b>systematization</b> of the world itself. This autonomous system gradually evolves as it synthesizes opposing ideas through the dialectical process. In this way, rationality (and thereby reality) realizes itself, ultimately becoming self-aware in the form of the World Spirit (or God).</p><p id="ce4a">One of the consequences is that God, as the self-organizing principle of reality, is again seen as rational, and we can again access the divine through rational reflection. Hegel is effectively translating religion into philosophy.</p><p id="fbc4">While popular in his time, Hegel’s ideas faced critiques on numerous front

Options

s:</p><ul><li>Schopenhauer (and later Nietzsche) considered the intelligibility patterns to be driven by will (Will to Live, Will to Power), making them fundamentally irrational and arbitrary.</li><li>Kierkegaard criticized Hegel’s philosophy for being a purely intellectual system lacking in the participatory knowledge needed to cultivate wisdom. From the Kierkegaardian perspective, our attempts to realize the divine have been severed from personal transformation (they do not compel us to take the “leap of faith”).</li><li>Marx saw religion as an opium distracting us from the reality of how socioeconomic forces shape history through conflict. The participation that Hegel inherently lacked, Marx provided through a call to political and economic revolution.</li></ul><p id="dc4e"><a href="https://readmedium.com/summary-of-awakening-from-the-meaning-crisis-by-john-vervaeke-chapter-23-romanticism-0ded8b29cb29">Previous chapter: Romanticism</a></p><p id="24a8"><a href="https://readmedium.com/summary-of-awakening-from-the-meaning-crisis-by-john-vervaeke-chapter-25-the-clash-a8ea65710b2d">Next chapter: The Clash</a></p></article></body>

Bot making Bot: Data to Dialog

with Streamlit, Langchain, HuggingFace and VertexAI Palm APIs

Photo by Vidar Nordli-Mathisen on Unsplash

In a world where technology continues to push boundaries, a remarkable feat is emerging at the intersection of AI and conversation. Imagine building a Google Bard or ChatGPT-style chatbot that not only mimics human interaction but responds using your own data. Intrigued? Let’s delve into a transformative workflow that brings this innovation to life. A bot making a Bot.

Demo

Watch the GST FAQs bot in action — a testament to this tech’s prowess, designed from another bot-wizard. However, this isn’t just about one bot. Swap data files and envision your custom creation, equipped to handle your domain’s demands.

The process is both fascinating and intuitive — a wizard-like interface guides you through the steps, from naming your bot to specifying training data. The result? A fully functional bot that’s ready to converse in a matter of seconds.

Code Explanation

bot_config_wizard.py: This code defines a graphical user interface (GUI) application using the tkinter library to create a configuration wizard for generating a FAQ bot. The output bot_config.json looks like below:

{
  "APP_NAME": "MyApp",
  "DOCS_INDEX":"/fullpath/to/docs.index", 
  "FAISS_STORE_PKL":"/fullpath/to/faiss_store.pkl",
  "FILES_PATHS": [
    "/fullpath/to/file1.csv",
    "/fullpath/to/file2.txt",
    "/fullpath/to/file3.pdf"
  ]
}

You can manually edit it or run following wizard app to set the same parameters, it writes the same.

The BotConfigWizard class is the heart of the application. Its constructor takes a root parameter, which is a main window where all GUI components will be displayed. The constructor initializes the GUI and calls the create_widgets method to create various components.

class BotConfigWizard:
    def __init__(self, root):
        # ...
        self.create_widgets()
    def create_widgets(self):
        # ...

This method creates various widgets like labels, entry fields, listboxes, buttons, etc., and organizes them within the main window.

    def browse_models_folder(self):
        # ...

    def browse_files(self):
        # ...

    def ok_button_callback(self):
        # ...

    def cancel_button_callback(self):
        # ...

These callback functions are triggered by various user interactions:

  • browse_models_folder: Opens a folder selection dialog and sets the selected folder path to a variable.
  • browse_files: Opens a file selection dialog and inserts selected file paths into a listbox.
  • ok_button_callback: Collects the entered bot name, selected files, and models folder, then creates a dictionary with this data. This dictionary is then saved as a JSON file named `bot_config.json`.
  • cancel_button_callback: Closes the application when the "Cancel" button is clicked.

streamlit_main.py

This Python script serves as the frontend for a FAQ bot built using the Streamlit framework. The bot interacts with users, retrieves information, and generates responses based on configured data sources.

class MyFAQsBot:
    def __init__(self, config_json):
        # ...
        self.create_chain()
    
    # ... (other methods)

The MyFAQsBot class is responsible for creating and interacting with the bot. The constructor initializes the bot's attributes using data from the configuration JSON file. It then calls the create_chain method to set up the bot's retrieval and language model chain.

    def create_chain(self):
        # ...
        return chain

This method generates a retrieval and language model chain. If the bot’s index exists, it’s loaded; otherwise, data is loaded from various file types (CSV, PDF, TXT, HTML), embeddings are generated, and the FAISS index is created. The chain is then constructed using the LLM and retriever.

    def run_ui(self):
        # ...
    bot.run_ui()

The run_ui method executes the Streamlit interface for user interaction. It handles user inputs, processes them through the chain, and displays messages using the streamlit_chat module.

The whole working code for the app is made available at

A Journey Beyond Proof of Concept

While this workflow might start as a proof of concept (PoC), its potential for growth is boundless. What begins on a small scale has the power to evolve into a robust enterprise-level application. Picture deploying these AI-powered bots across various industries — from customer support to content creation — enhancing efficiency and customer engagement.

Exploring New Horizons

In a world brimming with possibilities, the Vertex AI and PaLM APIs are your starting point. However, don’t hesitate to explore alternatives that resonate with you. Langchain introduces an array of language models to choose from, allowing you to customize your AI’s personality and responses.

A Weekend Project?

This transformative journey isn’t just for students. It’s an invitation for generative AI enthusiasts and professionals alike to take part. Think of it as a weekend project that promises both intellectual satisfaction and tangible outcomes.

Conclusion

As you embark on this journey, imagine the doors that will open. Your personalized AI bot, conversing fluently in your domain, stands as a testament to innovation’s unending potential. From conceptualizing a bot to fostering insightful dialogues, you’re at the helm of reshaping interactions in the digital age. Embrace this journey and uncover the future of conversational AI, one dialogue at a time.

Feel free to follow me at LinkedIn

Vertex AI
Langchain
Google Cloud Platform
Chatbots
Artificial Intelligence
Recommended from ReadMedium