# Creating Custom Components (Input and Output)

**URL:** <https://forum.rasa.com/t/creating-custom-components-input-and-output/24298>\
**Category:** Rasa Open Source\
**Created:** [February 3, 2020, 3:30pm UTC](https://forum.rasa.com/t/creating-custom-components-input-and-output/24298 "2020-02-03T15:30:52Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![aidanloch](https://avatars.discourse-cdn.com/v4/letter/a/b9bd4f/32.png) [@aidanloch](https://forum.rasa.com/u/aidanloch)\
**Post date:** [February 3, 2020, 3:30pm UTC](https://forum.rasa.com/t/creating-custom-components-input-and-output/24298/1 "2020-02-03T15:30:52Z")

</div>

Hello all, I am attempting to create my own custom rasa nlu components (hopefully a tokenizer and an intent classifier that uses keras). While there are many custom components online that have some explanation (such as the blog post done by Rasa on Sentiment Analysis), I am having trouble understanding the way in which these components are taking in data and then sending it out. I come from a tensorflow ML background and therefore I am used to taking in data as numpy arrays (or TF tensors) and the model out as a .h5. Any explanation on how Rasa handles this would be very much appreciated. Thanks!

---

<div class="post-metadata">

**Author:** ![akelad](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/akelad/32/69_2.png) [@akelad](https://forum.rasa.com/u/akelad)\
**Post date:** [February 5, 2020, 9:14am UTC](https://forum.rasa.com/t/creating-custom-components-input-and-output/24298/2 "2020-02-05T09:14:43Z")

</div>

Hey @aidanloch, this depends on what type of component you’re building. Tokenizers for example would provide text: [rasa/whitespace\_tokenizer.py at 1.7.x · RasaHQ/rasa · GitHub](https://github.com/RasaHQ/rasa/blob/1.7.x/rasa/nlu/tokenizers/whitespace_tokenizer.py)

Classifiers would provide intent labels and their rankings/confidences: [rasa/embedding\_intent\_classifier.py at 1.7.x · RasaHQ/rasa · GitHub](https://github.com/RasaHQ/rasa/blob/1.7.x/rasa/nlu/classifiers/embedding_intent_classifier.py)

---

<div class="post-metadata">

**Author:** ![Chris38](https://avatars.discourse-cdn.com/v4/letter/c/f475e1/32.png) [@Chris38](https://forum.rasa.com/u/Chris38)\
**Post date:** [January 3, 2021, 8:57am UTC](https://forum.rasa.com/t/creating-custom-components-input-and-output/24298/3 "2021-01-03T08:57:05Z")

</div>

Could you elaborate a bit more on the classifier part please? I am trying to build a custom classifier and so far I do not understand, how I could achieve a ranking of my responses.

So what I’m trying to do is to create a custom response selector that ranks the responses from the training data by cosine similarity of their BOW representation to the user input. Therefore I think I need to access all the responses in the process method of my custom classifier class. But how can i do that?
